class Coinone::Public::Tickers
Attributes
result[R]
tickers[R]
timestamp[R]
Public Class Methods
new(params={})
click to toggle source
# File lib/coinone/public/tickers.rb, line 9 def initialize(params={}) @result = params[:result] || nil @timestamp = params[:timestamp] || nil @tickers = [] push_tickers(params) end
Public Instance Methods
push_tickers(params)
click to toggle source
# File lib/coinone/public/tickers.rb, line 16 def push_tickers(params) @tickers.clear currency_list = [:btc, :eth, :etc] currency_list.each do |currency| if params.has_key? currency @tickers.push(Ticker.new(params[currency])) end end @tickers.push(Ticker.new(params)) if params.has_key? :currency end