Class: MtGox::Balance
- Inherits:
-
Object
- Object
- MtGox::Balance
- Defined in:
- lib/mtgox/balance.rb
Instance Attribute Summary collapse
-
#amount ⇒ Object
Returns the value of attribute amount.
-
#currency ⇒ Object
Returns the value of attribute currency.
Instance Method Summary collapse
-
#initialize(currency = nil, amount = nil) ⇒ Balance
constructor
A new instance of Balance.
Constructor Details
#initialize(currency = nil, amount = nil) ⇒ Balance
Returns a new instance of Balance.
7 8 9 10 |
# File 'lib/mtgox/balance.rb', line 7 def initialize(currency=nil, amount=nil) self.currency = currency.to_s.upcase self.amount = BigDecimal(amount.to_s) end |
Instance Attribute Details
#amount ⇒ Object
Returns the value of attribute amount.
5 6 7 |
# File 'lib/mtgox/balance.rb', line 5 def amount @amount end |
#currency ⇒ Object
Returns the value of attribute currency.
5 6 7 |
# File 'lib/mtgox/balance.rb', line 5 def currency @currency end |