Sha256: 13ac48c4432ba9c2544213abb828e8ae87e030c12e1b56e9714b9d2742a6460b
Contents?: true
Size: 1.13 KB
Versions: 347
Compression:
Stored size: 1.13 KB
Contents
# The null loader is empty and delegates everything to its parent if it has one. # class Puppet::Pops::Loader::NullLoader < Puppet::Pops::Loader::Loader attr_reader :loader_name # Construct a NullLoader, optionally with a parent loader # def initialize(parent_loader=nil, loader_name = "null-loader") super(loader_name) @parent = parent_loader end # Has parent if one was set when constructed def parent @parent end def find(typed_name) if @parent.nil? nil else @parent.find(typed_name) end end def load_typed(typed_name) if @parent.nil? nil else @parent.load_typed(typed_name) end end def loaded_entry(typed_name, check_dependencies = false) if @parent.nil? nil else @parent.loaded_entry(typed_name, check_dependencies) end end # Has no entries on its own - always nil def get_entry(typed_name) nil end # Finds nothing, there are no entries def find(name) nil end # Cannot store anything def set_entry(typed_name, value, origin = nil) nil end def to_s() "(NullLoader '#{loader_name}')" end end
Version data entries
347 entries across 347 versions & 3 rubygems