Sha256: 72ca801a9fc2fc66f2d19c08f2b834094cc82800569775d7b264e16579844d5a
Contents?: true
Size: 879 Bytes
Versions: 122
Compression:
Stored size: 879 Bytes
Contents
module Puppet::Pops::Loader # A PredefinedLoader is a loader that is manually populated with loaded elements # before being used. It never loads anything on its own. # When searching for a type, it must exist or an error is raised # class PredefinedLoader < BaseLoader def find(typed_name) if typed_name.type == :type raise Puppet::Pops::Loaders::LoaderError, "Cannot load undefined type '#{typed_name.name.capitalize}'" else nil end end def to_s() "(PredefinedLoader '#{loader_name}')" end # 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. # def allow_shadowing? true end end end
Version data entries
122 entries across 122 versions & 2 rubygems