Class: MBTC::Ticker

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#buyObject (readonly)

Returns the value of attribute buy.



18
19
20
# File 'lib/mbtc/ticker.rb', line 18

def buy
  @buy
end

#dateObject (readonly)

Returns the value of attribute date.



20
21
22
# File 'lib/mbtc/ticker.rb', line 20

def date
  @date
end

#highObject (readonly)

Returns the value of attribute high.



14
15
16
# File 'lib/mbtc/ticker.rb', line 14

def high
  @high
end

#lastObject (readonly)

Returns the value of attribute last.



17
18
19
# File 'lib/mbtc/ticker.rb', line 17

def last
  @last
end

#lowObject (readonly)

Returns the value of attribute low.



15
16
17
# File 'lib/mbtc/ticker.rb', line 15

def low
  @low
end

#sellObject (readonly)

Returns the value of attribute sell.



19
20
21
# File 'lib/mbtc/ticker.rb', line 19

def sell
  @sell
end

#volObject (readonly)

Returns the value of attribute vol.



16
17
18
# File 'lib/mbtc/ticker.rb', line 16

def vol
  @vol
end