Class: MBTC::Trade
- Inherits:
-
Object
- Object
- MBTC::Trade
- 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
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#price ⇒ Object
readonly
Returns the value of attribute price.
-
#tid ⇒ Object
readonly
Returns the value of attribute tid.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Trade
constructor
A new instance of Trade.
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
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
13 14 15 |
# File 'lib/mbtc/trade.rb', line 13 def amount @amount end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
11 12 13 |
# File 'lib/mbtc/trade.rb', line 11 def date @date end |
#price ⇒ Object (readonly)
Returns the value of attribute price.
12 13 14 |
# File 'lib/mbtc/trade.rb', line 12 def price @price end |
#tid ⇒ Object (readonly)
Returns the value of attribute tid.
14 15 16 |
# File 'lib/mbtc/trade.rb', line 14 def tid @tid end |