Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/money/core_extensions.rb

Overview

Allows Writing of 100.to_money for Numeric types

100.to_money => #<Money @cents=10000>
100.37.to_money => #<Money @cents=10037>

Instance Method Summary collapse

Instance Method Details

#to_moneyObject



5
6
7
# File 'lib/money/core_extensions.rb', line 5

def to_money
  Money.new(self * 100)
end