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

divmod

        # Numeric.divmod

(from ruby core)
---
    divmod(other) -> array

---

Returns a 2-element array `[q, r]`, where

    q = (self/other).floor                  # Quotient
    r = self % other                        # Remainder

Of the Core and Standard Library classes, only Rational uses this
implementation.

Examples:

    Rational(11, 1).divmod(4)               # => [2, (3/1)]
    Rational(11, 1).divmod(-4)              # => [-3, (-1/1)]
    Rational(-11, 1).divmod(4)              # => [-3, (1/1)]
    Rational(-11, 1).divmod(-4)             # => [2, (-3/1)]

    Rational(12, 1).divmod(4)               # => [3, (0/1)]
    Rational(12, 1).divmod(-4)              # => [-3, (0/1)]
    Rational(-12, 1).divmod(4)              # => [-3, (0/1)]
    Rational(-12, 1).divmod(-4)             # => [3, (0/1)]

    Rational(13, 1).divmod(4.0)             # => [3, 1.0]
    Rational(13, 1).divmod(Rational(4, 11)) # => [35, (3/11)]



      

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.