Class: Puppet::Pops::Loaders
Defined Under Namespace
Classes: LoaderError, LoaderModuleData, ModuleResolver
Instance Attribute Summary collapse
Class Method Summary
collapse
-
.clear ⇒ Object
Clears the cached static and puppet_system loaders (to enable testing).
Instance Method Summary
collapse
Constructor Details
#initialize(environment) ⇒ Loaders
Returns a new instance of Loaders.
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/puppet/pops/loaders.rb', line 9
def initialize(environment)
@@static_loader ||= Puppet::Pops::Loader::StaticLoader.new()
@@puppet_system_loader ||= create_puppet_system_loader()
@private_environment_loader = create_environment_loader(environment)
end
|
Instance Attribute Details
#private_environment_loader ⇒ Object
7
8
9
|
# File 'lib/puppet/pops/loaders.rb', line 7
def private_environment_loader
@private_environment_loader
end
|
#public_environment_loader ⇒ Object
6
7
8
|
# File 'lib/puppet/pops/loaders.rb', line 6
def public_environment_loader
@public_environment_loader
end
|
#puppet_system_loader ⇒ Object
5
6
7
|
# File 'lib/puppet/pops/loaders.rb', line 5
def puppet_system_loader
@puppet_system_loader
end
|
#static_loader ⇒ Object
4
5
6
|
# File 'lib/puppet/pops/loaders.rb', line 4
def static_loader
@static_loader
end
|
Class Method Details
Clears the cached static and puppet_system loaders (to enable testing)
31
32
33
34
|
# File 'lib/puppet/pops/loaders.rb', line 31
def self.clear
@@static_loader = nil
@@puppet_system_loader = nil
end
|
Instance Method Details
#private_loader_for_module(module_name) ⇒ Object
53
54
55
56
57
58
59
60
61
62
|
# File 'lib/puppet/pops/loaders.rb', line 53
def private_loader_for_module(module_name)
md = @module_resolver[module_name] || (return nil)
unless md.resolved?
@module_resolver.resolve(md)
end
md.private_loader
end
|
#public_loader_for_module(module_name) ⇒ Object
44
45
46
47
48
49
50
51
|
# File 'lib/puppet/pops/loaders.rb', line 44
def public_loader_for_module(module_name)
md = @module_resolver[module_name] || (return nil)
md.public_loader
end
|