module CryptoTicker

This module bundles crypto-currency exchange public data API sources. (e.g. Bitcoin exchange rate, Litecoin, etc.)

Constants

VERSION

Public Class Methods

get_class_for(exchange_name) click to toggle source
# File lib/crypto_ticker.rb, line 262
def get_class_for(exchange_name)
  @@h[ exchange_name.gsub('-', '').downcase ]
end
makepair(base, quote='') click to toggle source
# File lib/crypto_ticker.rb, line 266
def makepair(base, quote='')
  if base =~ /([a-z]{3})\/([a-z]{3})/i
    base, quote = $1, $2
  end
  # assume user entered either a fxpair array or a fxpair string
  # TODO: error-checking on input
  pair = FXPair.new("#{base.upcase}/#{quote.upcase}")
  pair
end