Module: Puppet::Environments::EnvironmentLoader Private

Included in:
Cached, Combined, Directories, Static
Defined in:
lib/puppet/environments.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Provide any common methods that loaders should have. It requires that any classes that include this module implement get

API:

  • private

Instance Method Summary collapse

Instance Method Details

#clear_allObject

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.

API:

  • private



42
43
44
45
46
47
48
# File 'lib/puppet/environments.rb', line 42

def clear_all
  root = Puppet.lookup(:root_environment) { nil }
  unless root.nil?
    root.instance_variable_set(:@static_catalogs, nil)
    root.instance_variable_set(:@rich_data, nil)
  end
end

#get!(name) ⇒ Object

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.

API:

  • private



33
34
35
36
37
38
39
40
# File 'lib/puppet/environments.rb', line 33

def get!(name)
  environment = get(name)
  if environment
    environment
  else
    raise EnvironmentNotFound, name
  end
end