lib/convertator/providers/cbr_provider.rb in convertator-0.2.0 vs lib/convertator/providers/cbr_provider.rb in convertator-0.3.0
- old
+ new
@@ -1,13 +1,13 @@
require 'net/http'
require 'rexml/document'
module Convertator
module Providers
- class CbrProvider
+ class CbrProvider < Middleware
SERVICE_URI = 'http://www.cbr.ru/scripts/xml_daily.asp'.freeze
- def new_rates
+ def call
default_rates.merge parse(fetch)
end
private