Class: MtGox::Trade
Instance Attribute Summary
Attributes inherited from Order
Attributes inherited from Offer
Instance Method Summary collapse
-
#initialize(trade = {}) ⇒ Trade
constructor
A new instance of Trade.
Constructor Details
#initialize(trade = {}) ⇒ Trade
Returns a new instance of Trade.
6 7 8 9 10 11 |
# File 'lib/mtgox/trade.rb', line 6 def initialize(trade={}) self.id = trade['tid'].to_i self.date = Time.at(trade['date'].to_i) self.amount = trade['amount'].to_f self.price = trade['price'].to_f end |