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
Instance Method Summary collapse
- #clear_all ⇒ Object private
- #get!(name) ⇒ Object private
-
#guard(name) ⇒ Object
private
The base implementation is a noop, because `get` returns a new environment each time.
- #unguard(name) ⇒ Object private
Instance Method Details
#clear_all ⇒ 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.
44 45 46 47 48 49 50 |
# File 'lib/puppet/environments.rb', line 44 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.
35 36 37 38 39 40 41 42 |
# File 'lib/puppet/environments.rb', line 35 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.
56 |
# File 'lib/puppet/environments.rb', line 56 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.
57 |
# File 'lib/puppet/environments.rb', line 57 def unguard(name); end |