This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Numeric.% (from ruby core) --- self % other -> real_numeric --- Returns `self` modulo `other` as a real number. Of the Core and Standard Library classes, only Rational uses this implementation. For Rational `r` and real number `n`, these expressions are equivalent: c % n c-n*(c/n).floor c.divmod(n)[1] See Numeric#divmod. Examples: r = Rational(1, 2) # => (1/2) r2 = Rational(2, 3) # => (2/3) r % r2 # => (1/2) r % 2 # => (1/2) r % 2.0 # => 0.5 r = Rational(301,100) # => (301/100) r2 = Rational(7,5) # => (7/5) r % r2 # => (21/100) r % -r2 # => (-119/100) (-r) % r2 # => (119/100) (-r) %-r2 # => (-21/100) Numeric#modulo is an alias for Numeric#%.
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.