Class: Numeric Private
- Inherits:
-
Object
- Object
- Numeric
- Defined in:
- lib/money_attribute/core_ext/numeric.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Convenience method for converting numeric values to Mint::Money.
Instance Method Summary collapse
-
#to_money(currency = MoneyAttribute.default_currency) ⇒ Mint::Money
private
Converts the numeric value to a
Mint::Moneyvalue.
Instance Method Details
#to_money(currency = MoneyAttribute.default_currency) ⇒ Mint::Money
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Converts the numeric value to a Mint::Money value.
16 |
# File 'lib/money_attribute/core_ext/numeric.rb', line 16 def to_money(currency = MoneyAttribute.default_currency) = Money.from(self, currency) |