Class: Numeric

Inherits:
Object show all
Defined in:
lib/scruby/core_ext/numeric.rb

Instance Method Summary collapse

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

#rateObject

Rate is :scalar



3
# File 'lib/scruby/core_ext/numeric.rb', line 3

def rate; :scalar; end