Class: MtGox::Balance

Inherits:
Object
  • Object
show all
Defined in:
lib/mtgox/balance.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(currency = nil, amount = nil) ⇒ Balance

Returns a new instance of Balance.



5
6
7
8
# File 'lib/mtgox/balance.rb', line 5

def initialize(currency=nil, amount=nil)
  self.currency = currency.to_s.upcase
  self.amount = amount.to_f
end

Instance Attribute Details

#amountObject

Returns the value of attribute amount.



3
4
5
# File 'lib/mtgox/balance.rb', line 3

def amount
  @amount
end

#currencyObject

Returns the value of attribute currency.



3
4
5
# File 'lib/mtgox/balance.rb', line 3

def currency
  @currency
end