Method: Money::RatesStore::Memory#each_rate
- Defined in:
- lib/money/rates_store/memory.rb
#each_rate {|iso_from, iso_to, rate| ... } ⇒ Enumerator
Iterate over rate tuples (iso_from, iso_to, rate)
93 94 95 96 97 98 99 100 101 102 |
# File 'lib/money/rates_store/memory.rb', line 93 def each_rate(&block) return to_enum(:each_rate) unless block_given? guard.synchronize do rates.each do |key, rate| iso_from, iso_to = key.split(INDEX_KEY_SEPARATOR) yield iso_from, iso_to, rate end end end |