module Puppet::Environments::EnvironmentLoader
Provide any common methods that loaders should have. It requires that any classes that include this module implement get @api private
Public Instance Methods
clear_all()
click to toggle source
# File lib/puppet/environments.rb 45 def clear_all 46 root = Puppet.lookup(:root_environment) { nil } 47 unless root.nil? 48 root.instance_variable_set(:@static_catalogs, nil) 49 root.instance_variable_set(:@rich_data, nil) 50 end 51 end
get!(name)
click to toggle source
@!macro loader_get_or_fail
# File lib/puppet/environments.rb 36 def get!(name) 37 environment = get(name) 38 if environment 39 environment 40 else 41 raise EnvironmentNotFound, name 42 end 43 end
guard(name)
click to toggle source
The base implementation is a noop, because `get` returns a new environment each time.
@see Puppet::Environments::Cached#guard
# File lib/puppet/environments.rb 57 def guard(name); end
unguard(name)
click to toggle source
# File lib/puppet/environments.rb 58 def unguard(name); end