Module: EasyType::EncryptedYamlProperty
- Defined in:
- lib/easy_type/encrypted_yaml_property.rb
Overview
YamlPorperty get’s its value from the yaml data based on the name of the property
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(parent) ⇒ Object
14 15 16 17 18 |
# File 'lib/easy_type/encrypted_yaml_property.rb', line 14 def self.included(parent) parent.include( EasyType) parent.include( EncryptedProperty) parent.include( Encryption) end |
Instance Method Details
#current_value ⇒ Object
26 27 28 |
# File 'lib/easy_type/encrypted_yaml_property.rb', line 26 def current_value decrypted_value(is) end |
#is ⇒ Object
30 31 32 |
# File 'lib/easy_type/encrypted_yaml_property.rb', line 30 def is resource.current_config.fetch(name.to_s) { '' } end |
#on_apply ⇒ Object
20 21 22 23 24 |
# File 'lib/easy_type/encrypted_yaml_property.rb', line 20 def on_apply return if value.empty? resource.current_config[name.to_s] = encrypt(value) end |