Class: Hoodie::Crypto::Configuration
- Defined in:
- lib/hoodie/utils/crypto.rb
Overview
A Configuration instance
Instance Attribute Summary collapse
-
#:password(: password) ⇒ String
Access the password for this instance.
-
#:salt(: salt) ⇒ String
Access the salt for this instance.
-
#password ⇒ Object
Returns the value of attribute password.
-
#salt ⇒ Object
Returns the value of attribute salt.
Instance Method Summary collapse
-
#initialize(options = {}) {|_self| ... } ⇒ undefined
constructor
private
Initialized a configuration instance.
- #to_h ⇒ Object private
Constructor Details
#initialize(options = {}) {|_self| ... } ⇒ undefined
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Initialized a configuration instance
110 111 112 113 114 115 |
# File 'lib/hoodie/utils/crypto.rb', line 110 def initialize( = {}) @password = .fetch(:password, nil) @salt = .fetch(:salt, nil) yield self if block_given? end |
Instance Attribute Details
#:password(: password) ⇒ String
Returns access the password for this instance.
99 |
# File 'lib/hoodie/utils/crypto.rb', line 99 attr_accessor :password |
#:salt(: salt) ⇒ String
Returns access the salt for this instance.
103 |
# File 'lib/hoodie/utils/crypto.rb', line 103 attr_accessor :salt |
#password ⇒ Object
Returns the value of attribute password.
99 100 101 |
# File 'lib/hoodie/utils/crypto.rb', line 99 def password @password end |
#salt ⇒ Object
Returns the value of attribute salt.
103 104 105 |
# File 'lib/hoodie/utils/crypto.rb', line 103 def salt @salt end |
Instance Method Details
#to_h ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
118 119 120 |
# File 'lib/hoodie/utils/crypto.rb', line 118 def to_h { password: password, salt: salt }.freeze end |