Class: Coinone::Account::Balance::NormalWallet
- Inherits:
-
Object
- Object
- Coinone::Account::Balance::NormalWallet
- Defined in:
- lib/coinone/account/balance/normal_wallet.rb
Instance Attribute Summary collapse
-
#balance ⇒ Object
readonly
Returns the value of attribute balance.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ NormalWallet
constructor
A new instance of NormalWallet.
- #update_wallet(params = {}) ⇒ Object
Constructor Details
#initialize(params = {}) ⇒ NormalWallet
Returns a new instance of NormalWallet.
8 9 10 11 12 |
# File 'lib/coinone/account/balance/normal_wallet.rb', line 8 def initialize(params={}) @balance = nil @label = nil update_wallet(params) end |
Instance Attribute Details
#balance ⇒ Object (readonly)
Returns the value of attribute balance.
6 7 8 |
# File 'lib/coinone/account/balance/normal_wallet.rb', line 6 def balance @balance end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
6 7 8 |
# File 'lib/coinone/account/balance/normal_wallet.rb', line 6 def label @label end |
Instance Method Details
#update_wallet(params = {}) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/coinone/account/balance/normal_wallet.rb', line 14 def update_wallet(params={}) @balance = params[:balance].to_d if params.has_key? :balance @balance = params[:label] if params.has_key? :label # If wanna Full Decimal # => OBJ.to_digits end |