Module: Configliere::EncryptedParam

Included in:
Param
Defined in:
lib/configliere/encrypted.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#encrypt_passObject

The password used in encrypting params during serialization



6
7
8
# File 'lib/configliere/encrypted.rb', line 6

def encrypt_pass
  @encrypt_pass
end

Instance Method Details

#resolve!Object

decrypts any encrypted params then calls the next step in the resolve! chain.



10
11
12
13
14
# File 'lib/configliere/encrypted.rb', line 10

def resolve!
  resolve_encrypted!
  super()
  self
end

#resolve_encrypted!Object

import values, decrypting all params marked as encrypted



17
18
19
20
21
22
23
# File 'lib/configliere/encrypted.rb', line 17

def resolve_encrypted!
  remove_and_adopt_encrypt_pass_param_if_any!
  encrypted_params.each do |param|
    encrypted_val = deep_delete(*dotted_to_encrypted_keys(param)) or next
    self[param] = self.decrypted(encrypted_val)
  end
end