The null loader is empty and delegates everything to its parent if it has one.
Finds nothing, there are no entries
# File lib/puppet/pops/loader/null_loader.rb, line 32 def find(name) nil end
Has no entries on its own - always nil
# File lib/puppet/pops/loader/null_loader.rb, line 27 def get_entry(typed_name) nil end
# File lib/puppet/pops/loader/null_loader.rb, line 18 def load_typed(typed_name) if @parent.nil? nil else @parent.load_typed(typed_name) end end
Has parent if one was set when constructed
# File lib/puppet/pops/loader/null_loader.rb, line 14 def parent @parent end
Cannot store anything
# File lib/puppet/pops/loader/null_loader.rb, line 37 def set_entry(typed_name, value, origin = nil) nil end
# File lib/puppet/pops/loader/null_loader.rb, line 41 def to_s() "(NullLoader '#{loader_name}')" end
Construct a NullLoader, optionally with a parent loader
# File lib/puppet/pops/loader/null_loader.rb, line 8 def initialize(parent_loader=nil, loader_name = "null-loader") @loader_name = loader_name @parent = parent_loader end