Class: Coinone::Public::Tickers::Ticker
- Inherits:
-
Object
- Object
- Coinone::Public::Tickers::Ticker
- Defined in:
- lib/coinone/public/tickers/ticker.rb
Instance Attribute Summary collapse
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#first ⇒ Object
readonly
Returns the value of attribute first.
-
#high ⇒ Object
readonly
Returns the value of attribute high.
-
#last ⇒ Object
readonly
Returns the value of attribute last.
-
#low ⇒ Object
readonly
Returns the value of attribute low.
-
#volume ⇒ Object
readonly
Returns the value of attribute volume.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Ticker
constructor
A new instance of Ticker.
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
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
6 7 8 |
# File 'lib/coinone/public/tickers/ticker.rb', line 6 def currency @currency end |
#first ⇒ Object (readonly)
Returns the value of attribute first.
6 7 8 |
# File 'lib/coinone/public/tickers/ticker.rb', line 6 def first @first end |
#high ⇒ Object (readonly)
Returns the value of attribute high.
6 7 8 |
# File 'lib/coinone/public/tickers/ticker.rb', line 6 def high @high end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
6 7 8 |
# File 'lib/coinone/public/tickers/ticker.rb', line 6 def last @last end |
#low ⇒ Object (readonly)
Returns the value of attribute low.
6 7 8 |
# File 'lib/coinone/public/tickers/ticker.rb', line 6 def low @low end |
#volume ⇒ Object (readonly)
Returns the value of attribute volume.
6 7 8 |
# File 'lib/coinone/public/tickers/ticker.rb', line 6 def volume @volume end |