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

rationalize

        # Rational.rationalize

(from ruby core)
---
    rat.rationalize       ->  self
    rat.rationalize(eps)  ->  rational

---

Returns a simpler approximation of the value if the optional argument
`eps` is given (rat-|eps| <= result <= rat+|eps|), self otherwise.

    r = Rational(5033165, 16777216)
    r.rationalize                    #=> (5033165/16777216)
    r.rationalize(Rational('0.01'))  #=> (3/10)
    r.rationalize(Rational('0.1'))   #=> (1/3)



      

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.