lib/europe/currency/exchange_rates.rb in europe-0.0.4 vs lib/europe/currency/exchange_rates.rb in europe-0.0.5

- old
+ new

@@ -6,15 +6,13 @@ # currency module Currency # exchange rates module ExchangeRates EXCHANGE_URL = 'http://www.ecb.europa.eu/stats/' \ - 'eurofxref/eurofxref-daily.xml' + 'eurofxref/eurofxref-daily.xml'.freeze def self.retrieve extract_rates(Nokogiri::XML(open(EXCHANGE_URL))) end - - private def self.extract_rates(doc) rates = { date: Date.parse(doc.css('Cube Cube').first['time']), rates: {} } doc.css('Cube Cube Cube').each do |rate|