Class | Numeric |
In: |
lib/money/core_extensions.rb
|
Parent: | Object |
Converts this numeric into a Money object in the given currency.
@param [Currency, String, Symbol] currency
The currency to set the resulting +Money+ object to.
@return [Money]
@example
100.to_money #=> #<Money @cents=10000> 100.37.to_money #=> #<Money @cents=10037> BigDecimal.new('100').to_money #=> #<Money @cents=10000>
@see Money.from_numeric