Class: ActiveSupport::EncryptedConfiguration
- Inherits:
-
EncryptedFile
- Object
- EncryptedFile
- ActiveSupport::EncryptedConfiguration
- Defined in:
- lib/active_support/encrypted_configuration_env.rb
Defined Under Namespace
Classes: RailsEnv
Instance Method Summary collapse
- #env ⇒ Object
-
#initialize(config_path:, key_path:, env_key:, raise_if_missing_key:, rails_env: nil) ⇒ EncryptedConfiguration
constructor
A new instance of EncryptedConfiguration.
- #write(contents) ⇒ Object
Constructor Details
#initialize(config_path:, key_path:, env_key:, raise_if_missing_key:, rails_env: nil) ⇒ EncryptedConfiguration
Returns a new instance of EncryptedConfiguration.
12 13 14 15 16 17 |
# File 'lib/active_support/encrypted_configuration_env.rb', line 12 def initialize(config_path:, key_path:, env_key:, raise_if_missing_key:, rails_env: nil) super content_path: config_path, key_path: key_path, env_key: env_key, raise_if_missing_key: raise_if_missing_key @rails_env = rails_env end |
Instance Method Details
#env ⇒ Object
45 46 47 |
# File 'lib/active_support/encrypted_configuration_env.rb', line 45 def env @env ||= RailsEnv.new(config, @rails_env) end |
#write(contents) ⇒ Object
19 20 21 22 23 24 |
# File 'lib/active_support/encrypted_configuration_env.rb', line 19 def write(contents) deserialize(contents) @config = = @env = nil # Reinitialize for changed content. super end |