abstract class
Money::Bank
- Money::Bank
- Reference
- Object
Direct Known Subclasses
Defined in:
money/bank.crConstructors
Instance Method Summary
- #exchange(from : Money, to : Currency) : Money
-
#exchange_rate(base : Currency, other : Currency) : BigDecimal
Returns the exchange rate between
self
and other currency or raisesUnknownRateError
if not found. -
#exchange_rate?(base : Currency, other : Currency) : BigDecimal | Nil
Returns the exchange rate between
self
and other currency, ornil
if not found. -
#store : Currency::RateStore
An exchange
Currency::RateStore
object, used to persist exchange rate pairs. -
#store=(store : Currency::RateStore | Nil)
An exchange
Currency::RateStore
object, used to persist exchange rate pairs.
Constructor Detail
Instance Method Detail
Returns the exchange rate between self
and other currency or raises
UnknownRateError
if not found.
Returns the exchange rate between self
and other currency, or nil
if not found.
An exchange Currency::RateStore
object, used to persist exchange rate pairs.
NOTE Will return Money.default_rate_store
if set to nil
(the default).
An exchange Currency::RateStore
object, used to persist exchange rate pairs.
NOTE Will return Money.default_rate_store
if set to nil
(the default).