class Puppet::Pops::Loader::NullLoader

The null loader is empty and delegates everything to its parent if it has one.

Attributes

loader_name[R]

Public Instance Methods

find(name) click to toggle source

Finds nothing, there are no entries

# File lib/puppet/pops/loader/null_loader.rb, line 32
def find(name)
  nil
end
get_entry(typed_name) click to toggle source

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
load_typed(typed_name) click to toggle source
# 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
parent() click to toggle source

Has parent if one was set when constructed

# File lib/puppet/pops/loader/null_loader.rb, line 14
def parent
  @parent
end
set_entry(typed_name, value, origin = nil) click to toggle source

Cannot store anything

# File lib/puppet/pops/loader/null_loader.rb, line 37
def set_entry(typed_name, value, origin = nil)
  nil
end
to_s() click to toggle source
# File lib/puppet/pops/loader/null_loader.rb, line 41
def to_s()
  "(NullLoader '#{loader_name}')"
end

Public Class Methods

new(parent_loader=nil, loader_name = "null-loader") click to toggle source

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