lib/money/bank/open_exchange_rates_bank.rb
# Update all rates from openexchangerates JSON
#
# @return [Array] Array of exchange rates
Update all rates from openexchangerates JSON
Update all rates from openexchangerates JSON
def update_rates
        exchange_rates.each do |exchange_rate|
          rate = exchange_rate.last
          currency = exchange_rate.first
          next unless Money::Currency.find(currency)
          set_rate(source, currency, rate)
          set_rate(currency, source, 1.0 / rate)
        end
      end
def update_rates exchange_rates . each do | exchange_rate | rate = exchange_rate . last currency = exchange_rate . first next unless Money :: Currency . find ( currency ) set_rate ( source , currency , rate ) set_rate ( currency , source , 1.0 / rate ) end end
Update all rates from openexchangerates JSON
Update all rates from openexchangerates JSON
Array of exchange rates
Array of exchange rates
Array