class JustExchangeRatesPlus
Public Class Methods
fetch_app_id(reg)
click to toggle source
# File lib/justexchangerates.rb, line 90 def self.fetch_app_id(reg) decipher = ->(lookup_file, s) { DynarexPassword.new.reverse_lookup(s, lookup_file) } key = 'hkey_apps/justexchangerates' e = reg.get_key(key) lookup_file = e.text('lookup_file').to_s app_id = decipher.call(lookup_file, e.text('app_id').to_s) end
new(reg, base: 'USD', cache_refresh: '1 week', cache_path: '.', \ debug: false)
click to toggle source
Calls superclass method
JustExchangeRates::new
# File lib/justexchangerates.rb, line 105 def initialize(reg, base: 'USD', cache_refresh: '1 week', cache_path: '.', \ debug: false) @debug = debug app_id = JustExchangeRatesPlus.fetch_app_id(reg) super(base: 'USD', cache_refresh: '1 week', cache_path: '.', \ debug: debug, app_id: app_id) end