Class: Keylime::FileKeychainObject
- Inherits:
-
Object
- Object
- Keylime::FileKeychainObject
- Defined in:
- lib/keylime/credential.rb
Overview
Object for stub file keychain
Instance Attribute Summary collapse
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
Instance Method Summary collapse
- #delete ⇒ Object
-
#initialize(params = {}) ⇒ FileKeychainObject
constructor
A new instance of FileKeychainObject.
- #method_missing(sym, *args, &block) ⇒ Object
- #respond_to_missing?(method, _) ⇒ Boolean
Constructor Details
#initialize(params = {}) ⇒ FileKeychainObject
Returns a new instance of FileKeychainObject.
145 146 147 148 |
# File 'lib/keylime/credential.rb', line 145 def initialize(params = {}) @ref = params.delete('ref') @fields = params end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(sym, *args, &block) ⇒ Object
158 159 160 |
# File 'lib/keylime/credential.rb', line 158 def method_missing(sym, *args, &block) @fields[sym.to_s] || super end |
Instance Attribute Details
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
143 144 145 |
# File 'lib/keylime/credential.rb', line 143 def fields @fields end |
Instance Method Details
#delete ⇒ Object
150 151 152 |
# File 'lib/keylime/credential.rb', line 150 def delete @ref.delete(@fields) end |
#respond_to_missing?(method, _) ⇒ Boolean
154 155 156 |
# File 'lib/keylime/credential.rb', line 154 def respond_to_missing?(method, _) @fields.include?(method.to_s) || super end |