Module: EasyType::EncryptedProperty::ClassMethods

Defined in:
lib/easy_type/encrypted_property.rb

Overview

Class methods for an encrypted property

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object

Basic implementation for coercing a value to the correct type.



52
53
54
# File 'lib/easy_type/encrypted_property.rb', line 52

def coerce(value)
  value
end

#translate_to_resource(raw_resource) ⇒ Object



41
42
43
44
45
46
47
# File 'lib/easy_type/encrypted_property.rb', line 41

def translate_to_resource(raw_resource)
  if raw_resource.dig('AUTHENTICATION_TYPE') == "NONE"
    nil
  else
    '<encrypted value>'
  end
end