Class: Coinbase::BalanceMap
- Inherits:
-
Hash
- Object
- Hash
- Coinbase::BalanceMap
- Defined in:
- lib/coinbase/balance_map.rb
Overview
A convenience class for printing out Asset balances in a human-readable format.
Instance Method Summary collapse
-
#initialize(hash = {}) ⇒ BalanceMap
constructor
Returns a new BalanceMap object.
-
#inspect ⇒ String
Returns a string representation of the balance map.
-
#to_s ⇒ String
Returns a string representation of the balance map.
Constructor Details
#initialize(hash = {}) ⇒ BalanceMap
Returns a new BalanceMap object.
10 11 12 13 14 15 |
# File 'lib/coinbase/balance_map.rb', line 10 def initialize(hash = {}) super() hash.each do |key, value| self[key] = value end end |
Instance Method Details
#inspect ⇒ String
Returns a string representation of the balance map.
25 26 27 |
# File 'lib/coinbase/balance_map.rb', line 25 def inspect to_string end |
#to_s ⇒ String
Returns a string representation of the balance map.
19 20 21 |
# File 'lib/coinbase/balance_map.rb', line 19 def to_s to_string end |