Class: MBTC::Trade

Inherits:
Object
  • Object
show all
Defined in:
lib/mbtc/trade.rb

Overview

Trade

date: timestamp da operação. price: preço unitário em Reais da operação. amount: volume de Litecoin ou Bitcoin da operação. tid: ID da operação.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ Trade

Returns a new instance of Trade.



16
17
18
19
20
# File 'lib/mbtc/trade.rb', line 16

def initialize( params = {} )
  params.each do |k,v|
    self.instance_variable_set( "@#{k}", v )
  end
end

Instance Attribute Details

#amountObject (readonly)

Returns the value of attribute amount.



13
14
15
# File 'lib/mbtc/trade.rb', line 13

def amount
  @amount
end

#dateObject (readonly)

Returns the value of attribute date.



11
12
13
# File 'lib/mbtc/trade.rb', line 11

def date
  @date
end

#priceObject (readonly)

Returns the value of attribute price.



12
13
14
# File 'lib/mbtc/trade.rb', line 12

def price
  @price
end

#tidObject (readonly)

Returns the value of attribute tid.



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

def tid
  @tid
end