module RujitsuNumeric
Public Instance Methods
to_cents()
click to toggle source
convert float values to “cents”
my_value = 2.5 my_value.to_cents # => 250
# File lib/rujitsu/numeric.rb 7 def to_cents 8 (self * 100.0).to_i 9 end