Money::Currency::RateStore
Inherits Enumerable / Reference / Object
Instance methods
[](from, to) : BigDecimal
Retrieve the rate for the given currencies.
NOTE: Uses transaction to synchronize data access.
store = Money::Currency::RateStore::Memory.new
store["USD", "CAD"] = 1.24515
store["USD", "CAD"]? # => 1.24515
[]=(from, to, value : Number) : Nil
Registers a conversion rate and returns it.
NOTE: Uses transaction to synchronize data access.
store = Money::Currency::RateStore::Memory.new
store["USD", "CAD"] = 1.24515
store["CAD", "USD"] = 0.803115
Retrieve the rate for the given currencies.
NOTE: Uses transaction to synchronize data access.
store = Money::Currency::RateStore::Memory.new
store["USD", "CAD"] = 1.24515
store["USD", "CAD"]? # => 1.24515