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



45
46
47
48
49
50
51
# File 'lib/puppet/environments.rb', line 45

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



36
37
38
39
40
41
42
43
# File 'lib/puppet/environments.rb', line 36

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

#guard(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.

The base implementation is a noop, because get returns a new environment each time.

See Also:

API:

  • private



57
# File 'lib/puppet/environments.rb', line 57

def guard(name); end

#unguard(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



58
# File 'lib/puppet/environments.rb', line 58

def unguard(name); end