Class: Coinbase::Wallet::Data
- Inherits:
-
Object
- Object
- Coinbase::Wallet::Data
- Defined in:
- lib/coinbase/wallet.rb
Overview
The data required to recreate a Wallet.
Instance Attribute Summary collapse
-
#seed ⇒ Object
readonly
Returns the value of attribute seed.
-
#wallet_id ⇒ Object
readonly
Returns the value of attribute wallet_id.
Class Method Summary collapse
-
.from_hash(data) ⇒ Data
Creates a Data object from the given Hash.
Instance Method Summary collapse
-
#initialize(wallet_id:, seed:) ⇒ Data
constructor
Returns a new Data object.
-
#to_hash ⇒ Hash
Converts the Data object to a Hash.
Constructor Details
#initialize(wallet_id:, seed:) ⇒ Data
Returns a new Data object.
184 185 186 187 |
# File 'lib/coinbase/wallet.rb', line 184 def initialize(wallet_id:, seed:) @wallet_id = wallet_id @seed = seed end |
Instance Attribute Details
#seed ⇒ Object (readonly)
Returns the value of attribute seed.
179 180 181 |
# File 'lib/coinbase/wallet.rb', line 179 def seed @seed end |
#wallet_id ⇒ Object (readonly)
Returns the value of attribute wallet_id.
179 180 181 |
# File 'lib/coinbase/wallet.rb', line 179 def wallet_id @wallet_id end |
Class Method Details
Instance Method Details
#to_hash ⇒ Hash
Converts the Data object to a Hash.
191 192 193 |
# File 'lib/coinbase/wallet.rb', line 191 def to_hash { wallet_id: wallet_id, seed: seed } end |