Class: Puppet::Pops::Loader::PredefinedLoader

Inherits:
BaseLoader show all
Defined in:
lib/puppet/pops/loader/predefined_loader.rb

Overview

A PredefinedLoader is a loader that is manually populated with loaded elements before being used. It never loads anything on its own.

Constant Summary

Constants inherited from Loader

Loader::LOADABLE_KINDS

Instance Attribute Summary

Attributes inherited from BaseLoader

#parent

Attributes inherited from Loader

#loader_name

Instance Method Summary collapse

Methods inherited from BaseLoader

#add_entry, #discover, #get_entry, #initialize, #load_typed, #loaded_entry, #promote_entry, #remove_entry, #set_entry

Methods inherited from Loader

#[], #discover, #get_entry, #initialize, #inspect, #load, #load_typed, #loadables, #loaded_entry, #parent, #private_loader, #set_entry

Constructor Details

This class inherits a constructor from Puppet::Pops::Loader::BaseLoader

Instance Method Details

#allow_shadowing?Boolean

Allows shadowing since this loader is used internally for things like function local types And they should win as there is otherwise a risk that the local types clash with built in types that were added after the function was written, or by resource types loaded by the 3x auto loader.


19
20
21
# File 'lib/puppet/pops/loader/predefined_loader.rb', line 19

def allow_shadowing?
  true
end

#find(typed_name) ⇒ Object


7
8
9
# File 'lib/puppet/pops/loader/predefined_loader.rb', line 7

def find(typed_name)
  nil
end

#to_sObject


11
12
13
# File 'lib/puppet/pops/loader/predefined_loader.rb', line 11

def to_s()
  "(PredefinedLoader '#{loader_name}')"
end