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