Class: MercadoBitcoin::Api::Data::Ticker

Inherits:
Object
  • Object
show all
Defined in:
lib/mercado_bitcoin/api/data/ticker.rb

Instance Method Summary collapse

Instance Method Details

#to_hashObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/mercado_bitcoin/api/data/ticker.rb', line 12

def to_hash
  {
    high: high,
    low: low,
    vol: vol,
    last: last,
    buy: buy,
    sell: sell,
    date: date
  }
end

#to_jsonObject



24
25
26
# File 'lib/mercado_bitcoin/api/data/ticker.rb', line 24

def to_json
  to_hash.to_json
end