Sha256: 9586e3f6e2f3f9a2f2c592c1bff2688d3d1f8067d51cb580ea8743f1c3099eb2
Contents?: true
Size: 844 Bytes
Versions: 6
Compression:
Stored size: 844 Bytes
Contents
module Money::RatesStore module RateRemovalSupport # Remove a conversion rate and returns it. Uses +Mutex+ to synchronize data access. # # @param [String] currency_iso_from Currency to exchange from. # @param [String] currency_iso_to Currency to exchange to. # # @return [Numeric] # # @example # store = Money::RatesStore::Memory.new # store.remove_rate("USD", "CAD") # store.remove_rate("CAD", "USD") def remove_rate(currency_iso_from, currency_iso_to) transaction { index.delete rate_key_for(currency_iso_from, currency_iso_to) } end # Clears all conversion rates. Uses +Mutex+ to synchronize data access. # # @example # store = Money::RatesStore::Memory.new # store.clear_rates def clear_rates transaction { @index = {} } end end end
Version data entries
6 entries across 6 versions & 3 rubygems