class Numeric
opening the numberic standard class to add 2 methods
Public Instance Methods
to_amount()
click to toggle source
divide by 100
# File lib/core_ext/numeric.rb, line 9 def to_amount self / 100 end
to_cents()
click to toggle source
multiply by 100
# File lib/core_ext/numeric.rb, line 4 def to_cents self * 100 end