class SimpleExchangeRate::DatabaseUpdater
Constants
- API_URL
Public Class Methods
call()
click to toggle source
# File lib/simple_exchange_rate/database_updater.rb, line 9 def self.call online_file = OpenURI.open_uri(URI(API_URL)) file_path = DATABASE_FILE_PATH + '/exchange_rates.xml' f = File.new(file_path, 'w') f.write(online_file.read) f.close end