Class: Puppet::Pops::Lookup::ExplainSubLookup

Inherits:
ExplainTreeNode show all
Defined in:
lib/puppet/pops/lookup/explainer.rb

Instance Attribute Summary

Attributes inherited from ExplainTreeNode

#event, #key, #parent, #value

Instance Method Summary collapse

Methods inherited from ExplainTreeNode

#dump_outcome, #dump_value, #found, #found_in_defaults, #found_in_overrides, #increase_indent, #location_not_found, #not_found, #result, #to_hash, #to_s

Methods inherited from ExplainNode

#branches, #dump_texts, #explain, #inspect, #text, #to_hash, #to_s

Constructor Details

#initialize(parent, sub_key) ⇒ ExplainSubLookup

Returns a new instance of ExplainSubLookup.



406
407
408
409
# File 'lib/puppet/pops/lookup/explainer.rb', line 406

def initialize(parent, sub_key)
  super(parent)
  @sub_key = sub_key
end

Instance Method Details

#dump_on(io, indent, first_indent) ⇒ Object



411
412
413
414
415
416
# File 'lib/puppet/pops/lookup/explainer.rb', line 411

def dump_on(io, indent, first_indent)
  io << indent << 'Sub key: "' << @sub_key.join('.') << "\"\n"
  indent = increase_indent(indent)
  branches.each {|b| b.dump_on(io, indent, indent)}
  dump_outcome(io, indent)
end

#typeObject



418
419
420
# File 'lib/puppet/pops/lookup/explainer.rb', line 418

def type
  :sub_key
end