This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

to_i

        # Rational.to_i

(from ruby core)
---
    rat.to_i  ->  integer

---

Returns the truncated value as an integer.

Equivalent to Rational#truncate.

    Rational(2, 3).to_i    #=> 0
    Rational(3).to_i       #=> 3
    Rational(300.6).to_i   #=> 300
    Rational(98, 71).to_i  #=> 1
    Rational(-31, 2).to_i  #=> -15



      

This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.