Class: Puppet::Pops::Loader::StaticLoader
- Inherits:
-
Loader
show all
- Defined in:
- lib/puppet/pops/loader/static_loader.rb
Constant Summary
collapse
- BUILTIN_TYPE_NAMES =
%w{
Component
Exec
File
Filebucket
Group
Node
Notify
Package
Resources
Schedule
Service
Stage
Tidy
User
Whit
}.freeze
- BUILTIN_TYPE_NAMES_LC =
Set.new(BUILTIN_TYPE_NAMES.map { |n| n.downcase }).freeze
- BUILTIN_ALIASES =
{
'Data' => 'Variant[ScalarData,Undef,Hash[String,Data],Array[Data]]',
'RichDataKey' => 'Variant[String,Numeric]',
'RichData' => 'Variant[Scalar,SemVerRange,Binary,Sensitive,Type,TypeSet,URI,Object,Undef,Default,Hash[RichDataKey,RichData],Array[RichData]]',
'Puppet::LookupKey' => 'RichDataKey',
'Puppet::LookupValue' => 'RichData'
}.freeze
Constants inherited
from Loader
Loader::LOADABLE_KINDS
Instance Attribute Summary collapse
Attributes inherited from Loader
#environment, #loader_name
Instance Method Summary
collapse
Methods inherited from Loader
#[], #inspect, #load, #loadables, #private_loader
Constructor Details
Returns a new instance of StaticLoader.
40
41
42
43
44
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 40
def initialize
@loaded = {}
@runtime_3_initialized = false
create_built_in_types
end
|
Instance Attribute Details
39
40
41
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 39
def loaded
@loaded
end
|
Instance Method Details
#discover(type, error_collector = nil, name_authority = Pcore::RUNTIME_NAME_AUTHORITY) ⇒ Object
#find(name) ⇒ Object
66
67
68
69
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 66
def find(name)
nil
end
|
#get_entry(typed_name) ⇒ Object
58
59
60
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 58
def get_entry(typed_name)
load_constant(typed_name)
end
|
#load_typed(typed_name) ⇒ Object
54
55
56
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 54
def load_typed(typed_name)
load_constant(typed_name)
end
|
#loaded_entry(typed_name, check_dependencies = false) ⇒ Object
79
80
81
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 79
def loaded_entry(typed_name, check_dependencies = false)
@loaded[typed_name]
end
|
71
72
73
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 71
def parent
nil end
|
#runtime_3_init ⇒ Object
83
84
85
86
87
88
89
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 83
def runtime_3_init
unless @runtime_3_initialized
@runtime_3_initialized = true
create_resource_type_references
end
nil
end
|
#set_entry(typed_name, value, origin = nil) ⇒ Object
62
63
64
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 62
def set_entry(typed_name, value, origin = nil)
@loaded[typed_name] = Loader::NamedEntry.new(typed_name, value, origin)
end
|
75
76
77
|
# File 'lib/puppet/pops/loader/static_loader.rb', line 75
def to_s()
"(StaticLoader)"
end
|