Module: Money::RatesStore::RateRemovalSupport
- Defined in:
- lib/money/rates_store/rate_removal_support.rb
Instance Method Summary collapse
-
#clear_rates ⇒ Object
Clears all conversion rates.
-
#remove_rate(currency_iso_from, currency_iso_to) ⇒ Numeric
Remove a conversion rate and returns it.
Instance Method Details
#clear_rates ⇒ Object
Clears all conversion rates. Uses Mutex to synchronize data access.
23 24 25 |
# File 'lib/money/rates_store/rate_removal_support.rb', line 23 def clear_rates transaction { @index = {} } end |
#remove_rate(currency_iso_from, currency_iso_to) ⇒ Numeric
Remove a conversion rate and returns it. Uses Mutex to synchronize data access.
14 15 16 |
# File 'lib/money/rates_store/rate_removal_support.rb', line 14 def remove_rate(currency_iso_from, currency_iso_to) transaction { index.delete rate_key_for(currency_iso_from, currency_iso_to) } end |