Method: Numeric#to_money
- Defined in:
- lib/money/core_extensions.rb
#to_money(currency = nil) ⇒ Money
Converts this numeric into a Money
object in the given currency
.
18 19 20 |
# File 'lib/money/core_extensions.rb', line 18 def to_money(currency = nil) Money.from_numeric(self, currency || Money.default_currency) end |