Class: Numeric

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

Instance Method Summary collapse

Instance Method Details

#dollarsObject Also known as: dollar



10
11
12
# File 'lib/coinage/core_ext/numeric.rb', line 10

def dollars
  Money.new(self*100)
end

#to_moneyObject Also known as: cents, cent



3
4
5
# File 'lib/coinage/core_ext/numeric.rb', line 3

def to_money
  Money.new(self)
end