Class: MBTC::Ticker
- Inherits:
-
Object
- Object
- MBTC::Ticker
- Defined in:
- lib/mbtc/ticker.rb
Overview
Ticker
high: maior valor em Reais de negociação do dia. low: menor valor em Reais de negociação do dia. vol: volume de Bitcoin ou Litecoin negociado no dia. last: último valor em Reais negociado. buy: valor atual em Reais ofertado para compra. sell: valor atual em Reais ofertado para venda. date: timestamp da última atualização do ticker.
Instance Attribute Summary collapse
-
#buy ⇒ Object
readonly
Returns the value of attribute buy.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#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.
-
#sell ⇒ Object
readonly
Returns the value of attribute sell.
-
#vol ⇒ Object
readonly
Returns the value of attribute vol.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Ticker
constructor
A new instance of Ticker.
Constructor Details
#initialize(params = {}) ⇒ Ticker
Returns a new instance of Ticker.
22 23 24 25 26 |
# File 'lib/mbtc/ticker.rb', line 22 def initialize( params = {} ) params.each do |k,v| self.instance_variable_set( "@#{k}", v ) end end |
Instance Attribute Details
#buy ⇒ Object (readonly)
Returns the value of attribute buy.
18 19 20 |
# File 'lib/mbtc/ticker.rb', line 18 def buy @buy end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
20 21 22 |
# File 'lib/mbtc/ticker.rb', line 20 def date @date end |
#high ⇒ Object (readonly)
Returns the value of attribute high.
14 15 16 |
# File 'lib/mbtc/ticker.rb', line 14 def high @high end |
#last ⇒ Object (readonly)
Returns the value of attribute last.
17 18 19 |
# File 'lib/mbtc/ticker.rb', line 17 def last @last end |
#low ⇒ Object (readonly)
Returns the value of attribute low.
15 16 17 |
# File 'lib/mbtc/ticker.rb', line 15 def low @low end |
#sell ⇒ Object (readonly)
Returns the value of attribute sell.
19 20 21 |
# File 'lib/mbtc/ticker.rb', line 19 def sell @sell end |
#vol ⇒ Object (readonly)
Returns the value of attribute vol.
16 17 18 |
# File 'lib/mbtc/ticker.rb', line 16 def vol @vol end |