class CoinmarketcapLitePlus

Public Class Methods

fetch_apikey(regx) click to toggle source
# File lib/coinmarketcap_lite.rb, line 152
def self.fetch_apikey(regx)
  
  reg = if regx.is_a? String then
    RemoteDwsRegistry.new domain: regx
  else
    regx
  end

  decipher = ->(lookup_file, s) {
    DynarexPassword.new.reverse_lookup(s, lookup_file)
  }
  
  key = 'hkey_apps/coinmarketcap'
  e = reg.get_key(key)
  lookup_file = e.text('lookup_file').to_s
  
  apikey = decipher.call(lookup_file, e.text('apikey').to_s)
  
end
new(reg, debug: false) click to toggle source
Calls superclass method CoinmarketcapLite::new
# File lib/coinmarketcap_lite.rb, line 172
def initialize(reg, debug: false)

  @debug = debug
      
  apikey = CoinmarketcapLitePlus.fetch_apikey(reg)

  super(apikey: apikey)

end