Class: Qonfig::Commands::Definition::ExposeVault Private
- Defined in:
- lib/qonfig/plugins/vault/commands/definition/expose_vault.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Constant Summary collapse
- EXPOSERS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{ path: :path, env_key: :env_key }.freeze
- EMPTY_VAULT_DATA =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
{}.freeze
Instance Attribute Summary collapse
- #env ⇒ Symbol, String readonly private
- #path ⇒ String, Pathname readonly private
- #replace_on_merge ⇒ Boolean readonly private
- #strict ⇒ Boolean readonly private
- #via ⇒ Symbol readonly private
Instance Method Summary collapse
- #call(_data_set, settings) ⇒ void private
-
#initialize(path, via:, env:, strict: true, replace_on_merge: false) ⇒ ExposeVault
constructor
private
A new instance of ExposeVault.
Methods inherited from Base
inheritable=, inheritable?, #inheritable?, inherited
Constructor Details
#initialize(path, via:, env:, strict: true, replace_on_merge: false) ⇒ ExposeVault
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ExposeVault.
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/qonfig/plugins/vault/commands/definition/expose_vault.rb', line 61 def initialize(path, via:, env:, strict: true, replace_on_merge: false) unless env.is_a?(Symbol) || env.is_a?(String) || env.is_a?(Numeric) raise Qonfig::ArgumentError, ':env should be a string or a symbol' end raise Qonfig::ArgumentError, ':env should be provided' if env.to_s.empty? raise Qonfig::ArgumentError, 'used :via is unsupported' unless EXPOSERS.key?(via) @path = path @via = via @env = env @strict = strict @replace_on_merge = replace_on_merge end |
Instance Attribute Details
#env ⇒ Symbol, String (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
44 45 46 |
# File 'lib/qonfig/plugins/vault/commands/definition/expose_vault.rb', line 44 def env @env end |
#path ⇒ String, Pathname (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/qonfig/plugins/vault/commands/definition/expose_vault.rb', line 26 def path @path end |
#replace_on_merge ⇒ Boolean (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
50 51 52 |
# File 'lib/qonfig/plugins/vault/commands/definition/expose_vault.rb', line 50 def replace_on_merge @replace_on_merge end |
#strict ⇒ Boolean (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 |
# File 'lib/qonfig/plugins/vault/commands/definition/expose_vault.rb', line 32 def strict @strict end |
#via ⇒ Symbol (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/qonfig/plugins/vault/commands/definition/expose_vault.rb', line 38 def via @via end |
Instance Method Details
#call(_data_set, settings) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
This method returns an undefined value.
82 83 84 85 86 87 88 89 |
# File 'lib/qonfig/plugins/vault/commands/definition/expose_vault.rb', line 82 def call(_data_set, settings) case via when EXPOSERS[:path] expose_path!(settings) when EXPOSERS[:env_key] expose_env_key!(settings) end end |