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

abs

        # Rational.abs

(from ruby core)
---
    rat.abs        ->  rational
    rat.magnitude  ->  rational

---

Returns the absolute value of `rat`.

    (1/2r).abs    #=> (1/2)
    (-1/2r).abs   #=> (1/2)

Rational#magnitude is an alias for Rational#abs.



      

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.