Class: Puppet::Environments::StaticDirectory Private

Inherits:
Static show all
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

Methods inherited from Static

#get, #list, #search_paths

Methods included from EnvironmentLoader

#clear_all, #get!

Methods included from EnvironmentCreator

#for

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)


144
145
146
147
148
# File 'lib/puppet/environments.rb', line 144

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.


151
152
153
154
# File 'lib/puppet/environments.rb', line 151

def get_conf(name)
  return nil unless name.intern == @env_name
  Puppet::Settings::EnvironmentConf.load_from(@env_dir, [])
end