Class: Puppet::Pops::Lookup::ExplainPath
Instance Attribute Summary
#event, #key, #parent, #value
Instance Method Summary
collapse
#dump_outcome, #dump_texts, #dump_value, #found, #found_in_defaults, #found_in_overrides, #increase_indent, #module_not_found, #not_found, #path_not_found, #result, #text
Methods inherited from ExplainNode
#branches, #to_s
Constructor Details
#initialize(parent, path) ⇒ ExplainPath
Returns a new instance of ExplainPath.
356
357
358
359
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 356
def initialize(parent, path)
super(parent)
@path = path
end
|
Instance Method Details
#dump_on(io, indent, first_indent) ⇒ Object
361
362
363
364
365
366
367
368
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 361
def dump_on(io, indent, first_indent)
io << indent << 'Path "' << @path.path.to_s << "\"\n"
indent = increase_indent(indent)
io << indent << 'Original path: "' << @path.original_path << "\"\n"
branches.each {|b| b.dump_on(io, indent, indent)}
io << indent << "Path not found\n" if @event == :path_not_found
dump_outcome(io, indent)
end
|
370
371
372
373
374
375
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 370
def to_hash
hash = super
hash[:original_path] = @path.original_path
hash[:path] = @path.path.to_s
hash
end
|
377
378
379
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 377
def type
:path
end
|