abstract struct Number
- Number
- Value
- Object
Overview
The top-level number type.
Included Modules
- Comparable(BigFloat)
- Comparable(Number)
- Steppable
Defined in:
core_ext/to_money.crInstance Method Summary
-
#to_money(currency = Money.default_currency) : Money
Returns a
Moneyinstance parsed fromself. -
#to_money?(currency = Money.default_currency) : Money | Nil
Returns a
Moneyinstance parsed fromselfif possible,nilotherwise.
Instance Method Detail
Returns a Money instance parsed from self.
See also Money.from_amount.
Returns a Money instance parsed from self if possible, nil otherwise.
See also Money.from_amount.