Class: Minfra::Cli::Env
- Inherits:
-
Object
- Object
- Minfra::Cli::Env
- Defined in:
- lib/minfra/cli/env.rb
Instance Attribute Summary collapse
-
#hiera ⇒ Object
readonly
Returns the value of attribute hiera.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, hiera_root:, hiera_env_path:, hiera_debug_lookups:, backends:) ⇒ Env
constructor
A new instance of Env.
- #l(key, value = nil) ⇒ Object
- #l!(key, value = nil) ⇒ Object
Constructor Details
#initialize(name:, hiera_root:, hiera_env_path:, hiera_debug_lookups:, backends:) ⇒ Env
Returns a new instance of Env.
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/minfra/cli/env.rb', line 5 def initialize(name:, hiera_root:, hiera_env_path:, hiera_debug_lookups:, backends: ) @name = name @hiera = HieraLooker.new( root: hiera_root, env_name: name, env_path: hiera_env_path, debug_lookups: hiera_debug_lookups, backends: backends ) end |
Instance Attribute Details
#hiera ⇒ Object (readonly)
Returns the value of attribute hiera.
4 5 6 |
# File 'lib/minfra/cli/env.rb', line 4 def hiera @hiera end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/minfra/cli/env.rb', line 4 def name @name end |
Instance Method Details
#l(key, value = nil) ⇒ Object
16 17 18 |
# File 'lib/minfra/cli/env.rb', line 16 def l(key, value = nil) @hiera.l(key,value) end |
#l!(key, value = nil) ⇒ Object
20 21 22 |
# File 'lib/minfra/cli/env.rb', line 20 def l!(key, value = nil) @hiera.l!(key, value) end |