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 44 def clear_all 45 root = Puppet.lookup(:root_environment) { nil } 46 unless root.nil? 47 root.instance_variable_set(:@static_catalogs, nil) 48 root.instance_variable_set(:@rich_data, nil) 49 end 50 end
get!(name)
click to toggle source
@!macro loader_get_or_fail
# File lib/puppet/environments.rb 35 def get!(name) 36 environment = get(name) 37 if environment 38 environment 39 else 40 raise EnvironmentNotFound, name 41 end 42 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 56 def guard(name); end
unguard(name)
click to toggle source
# File lib/puppet/environments.rb 57 def unguard(name); end