Class: Coinbase::Wallet::Data
- Inherits:
-
Object
- Object
- Coinbase::Wallet::Data
- Defined in:
- lib/coinbase/wallet/data.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.
12 13 14 15 |
# File 'lib/coinbase/wallet/data.rb', line 12 def initialize(wallet_id:, seed:) @wallet_id = wallet_id @seed = seed end |
Instance Attribute Details
#seed ⇒ Object (readonly)
Returns the value of attribute seed.
7 8 9 |
# File 'lib/coinbase/wallet/data.rb', line 7 def seed @seed end |
#wallet_id ⇒ Object (readonly)
Returns the value of attribute wallet_id.
7 8 9 |
# File 'lib/coinbase/wallet/data.rb', line 7 def wallet_id @wallet_id end |
Class Method Details
Instance Method Details
#to_hash ⇒ Hash
Converts the Data object to a Hash.
19 20 21 |
# File 'lib/coinbase/wallet/data.rb', line 19 def to_hash { wallet_id: wallet_id, seed: seed } end |