Class: Garcon::Crypto::Configuration
- Defined in:
- lib/garcon/utility/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
118 119 120 121 122 123 |
# File 'lib/garcon/utility/crypto.rb', line 118 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.
107 |
# File 'lib/garcon/utility/crypto.rb', line 107 attr_accessor :password |
#:salt(: salt) ⇒ String
Returns access the salt for this instance.
111 |
# File 'lib/garcon/utility/crypto.rb', line 111 attr_accessor :salt |
#password ⇒ Object
Returns the value of attribute password.
107 108 109 |
# File 'lib/garcon/utility/crypto.rb', line 107 def password @password end |
#salt ⇒ Object
Returns the value of attribute salt.
111 112 113 |
# File 'lib/garcon/utility/crypto.rb', line 111 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.
126 127 128 |
# File 'lib/garcon/utility/crypto.rb', line 126 def to_h { password: password, salt: salt }.freeze end |