class ActiveSupport::EncryptedConfiguration
- Parent:
- EncryptedFile
new(config_path:, key_path:, env_key:, raise_if_missing_key:) Show source
def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:)
super content_path: config_path, key_path: key_path,
env_key: env_key, raise_if_missing_key: raise_if_missing_key
end
Calls superclass method
def config
@config ||= deserialize(read).deep_symbolize_keys
end
def read
super
rescue ActiveSupport::EncryptedFile::MissingContentError
""
end
Allow a config to be started without a file present
Calls superclass method
def write(contents)
deserialize(contents)
super
end
Calls superclass method
© 2004–2019 David Heinemeier Hansson
Licensed under the MIT License.