Class: MtGox::Bid
Direct Known Subclasses
Constant Summary
Constants included from Value
Instance Attribute Summary
Attributes inherited from Offer
#amount, #client, #price, #timestamp
Instance Method Summary collapse
- #eprice ⇒ Object
-
#initialize(client, hash = nil) ⇒ Bid
constructor
A new instance of Bid.
Methods included from Value
#decimalify, #intify, #value_bitcoin, #value_currency
Constructor Details
#initialize(client, hash = nil) ⇒ Bid
Returns a new instance of Bid.
8 9 10 11 12 13 14 15 |
# File 'lib/mtgox/bid.rb', line 8 def initialize(client, hash = nil) self.client = client if hash self.price = value_currency hash, 'price_int' self.amount = value_bitcoin hash, 'amount_int' self. = hash['stamp'] end end |
Instance Method Details
#eprice ⇒ Object
17 18 19 |
# File 'lib/mtgox/bid.rb', line 17 def eprice price * (1 - self.client.commission) end |