Class: Puppet::Environments::StaticDirectory Private
- Defined in:
- lib/puppet/environments.rb
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.
Instance Method Summary collapse
-
#get_conf(name) ⇒ Puppet::Setting::EnvironmentConf?
private
Attempt to obtain the initial configuration for the environment.
-
#initialize(env_name, env_dir, environment) ⇒ StaticDirectory
constructor
private
Accepts a single environment in the given directory having the given name (not required to be reflected as the name of the directory).
Methods inherited from Static
Methods included from EnvironmentLoader
#clear_all, #get!, #guard, #unguard
Methods included from EnvironmentCreator
Constructor Details
#initialize(env_name, env_dir, environment) ⇒ StaticDirectory
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.
Accepts a single environment in the given directory having the given name (not required to be reflected as the name of the directory)
149 150 151 152 153 |
# File 'lib/puppet/environments.rb', line 149 def initialize(env_name, env_dir, environment) super(environment) @env_dir = env_dir @env_name = env_name.intern end |
Instance Method Details
#get_conf(name) ⇒ Puppet::Setting::EnvironmentConf?
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.
Attempt to obtain the initial configuration for the environment. Not all loaders can provide this.
156 157 158 159 160 |
# File 'lib/puppet/environments.rb', line 156 def get_conf(name) return nil unless name.intern == @env_name Puppet::Settings::EnvironmentConf.load_from(@env_dir, []) end |