Class: MtGox::Ask
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) ⇒ Ask
constructor
A new instance of Ask.
Methods included from Value
#decimalify, #intify, #value_bitcoin, #value_currency
Constructor Details
#initialize(client, hash = nil) ⇒ Ask
Returns a new instance of Ask.
8 9 10 11 12 13 14 15 |
# File 'lib/mtgox/ask.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/ask.rb', line 17 def eprice price / (1 - self.client.commission) end |