Class: Numeric
Instance Method Summary collapse
-
#max(other) ⇒ Object
Compares itself with
other
and returns biggest. -
#min(other) ⇒ Object
Compares itself with
other
and returns smallest. -
#rate ⇒ Object
Rate is :scalar.
Instance Method Details
#max(other) ⇒ Object
Compares itself with other
and returns biggest
6 7 8 |
# File 'lib/scruby/core_ext/numeric.rb', line 6 def max other self > other ? self : other end |
#min(other) ⇒ Object
Compares itself with other
and returns smallest
11 12 13 |
# File 'lib/scruby/core_ext/numeric.rb', line 11 def min other self < other ? self : other end |
#rate ⇒ Object
Rate is :scalar
3 |
# File 'lib/scruby/core_ext/numeric.rb', line 3 def rate; :scalar; end |