Class: Puppet::Pops::Lookup::ExplainPath
Instance Attribute Summary
#event, #key, #parent, #value
Instance Method Summary
collapse
#dump_outcome, #dump_value, #found, #found_in_defaults, #found_in_overrides, #increase_indent, #module_not_found, #not_found, #path_not_found, #result
Methods inherited from ExplainNode
#branches, #to_s
Constructor Details
#initialize(parent, path) ⇒ ExplainPath
Returns a new instance of ExplainPath.
292
293
294
295
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 292
def initialize(parent, path)
super(parent)
@path = path
end
|
Instance Method Details
#dump_on(io, indent, first_indent) ⇒ Object
297
298
299
300
301
302
303
304
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 297
def dump_on(io, indent, first_indent)
io << indent << 'Path "' << @path.path << "\"\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
|
306
307
308
309
310
311
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 306
def to_hash
hash = super
hash[:original_path] = @path.original_path
hash[:path] = @path.path.to_s
hash
end
|
313
314
315
|
# File 'lib/puppet/pops/lookup/explainer.rb', line 313
def type
:path
end
|