Class: CoinSync::Balance
- Inherits:
-
Object
- Object
- CoinSync::Balance
- Defined in:
- lib/coinsync/balance.rb
Instance Attribute Summary collapse
-
#available ⇒ Object
readonly
Returns the value of attribute available.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#locked ⇒ Object
readonly
Returns the value of attribute locked.
Instance Method Summary collapse
- #+(balance) ⇒ Object
-
#initialize(currency, available: BigDecimal(0), locked: BigDecimal(0)) ⇒ Balance
constructor
A new instance of Balance.
Constructor Details
#initialize(currency, available: BigDecimal(0), locked: BigDecimal(0)) ⇒ Balance
Returns a new instance of Balance.
5 6 7 8 9 |
# File 'lib/coinsync/balance.rb', line 5 def initialize(currency, available: BigDecimal(0), locked: BigDecimal(0)) @currency = currency @available = available @locked = locked end |
Instance Attribute Details
#available ⇒ Object (readonly)
Returns the value of attribute available.
3 4 5 |
# File 'lib/coinsync/balance.rb', line 3 def available @available end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
3 4 5 |
# File 'lib/coinsync/balance.rb', line 3 def currency @currency end |
#locked ⇒ Object (readonly)
Returns the value of attribute locked.
3 4 5 |
# File 'lib/coinsync/balance.rb', line 3 def locked @locked end |