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.



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

#amountObject

Returns the value of attribute amount.



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

def amount
  @amount
end

#currencyObject

Returns the value of attribute currency.



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

def currency
  @currency
end