class Cryptoexchange::Exchanges::Coinrail::Services::Pairs
Constants
- PAIRS_URL
Public Instance Methods
adapt(output)
click to toggle source
# File lib/cryptoexchange/exchanges/coinrail/services/pairs.rb, line 20 def adapt(output) pairs = [] output.map do |pair| base = pair["ce_name"] target = pair["cs_name"] pairs << Cryptoexchange::Models::MarketPair.new( base: base, target: target, market: Coinrail::Market::NAME ) end pairs end
fetch()
click to toggle source
Calls superclass method
Cryptoexchange::Services::Pairs#fetch
# File lib/cryptoexchange/exchanges/coinrail/services/pairs.rb, line 7 def fetch raw_output = super output = [] raw_output.map do |market| if market[0] == "btc_market" || market[0] == "krw_market" market[1].each { |pair| output.push(pair) } end end adapt(output) end