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)
154 155 156 157 158 |
# File 'lib/puppet/environments.rb', line 154 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.
161 162 163 164 |
# File 'lib/puppet/environments.rb', line 161 def get_conf(name) return nil unless name.intern == @env_name Puppet::Settings::EnvironmentConf.load_from(@env_dir, []) end |