Class: Coinone::Public::Tickers::Ticker

Inherits:
Object
  • Object
show all
Defined in:
lib/coinone/public/tickers/ticker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Ticker

Returns a new instance of Ticker.



8
9
10
11
12
13
14
15
16
17
# File 'lib/coinone/public/tickers/ticker.rb', line 8

def initialize(params={})

  @volume = params[:volume].to_f || nil
  @last= params[:last].to_i || nil
  @high= params[:high].to_i || nil
  @currency= params[:currency] || nil
  @low= params[:low].to_i || nil
  @first= params[:first].to_i || nil

end

Instance Attribute Details

#currencyObject (readonly)

Returns the value of attribute currency.



6
7
8
# File 'lib/coinone/public/tickers/ticker.rb', line 6

def currency
  @currency
end

#firstObject (readonly)

Returns the value of attribute first.



6
7
8
# File 'lib/coinone/public/tickers/ticker.rb', line 6

def first
  @first
end

#highObject (readonly)

Returns the value of attribute high.



6
7
8
# File 'lib/coinone/public/tickers/ticker.rb', line 6

def high
  @high
end

#lastObject (readonly)

Returns the value of attribute last.



6
7
8
# File 'lib/coinone/public/tickers/ticker.rb', line 6

def last
  @last
end

#lowObject (readonly)

Returns the value of attribute low.



6
7
8
# File 'lib/coinone/public/tickers/ticker.rb', line 6

def low
  @low
end

#volumeObject (readonly)

Returns the value of attribute volume.



6
7
8
# File 'lib/coinone/public/tickers/ticker.rb', line 6

def volume
  @volume
end