Class: Puppet::Pops::Lookup::ExplainScope
- Inherits:
-
ExplainTreeNode
- Object
- ExplainNode
- ExplainTreeNode
- Puppet::Pops::Lookup::ExplainScope
- Defined in:
- lib/puppet/pops/lookup/explainer.rb
Instance Attribute Summary
Attributes inherited from ExplainTreeNode
Instance Method Summary collapse
- #dump_on(io, indent, first_indent) ⇒ Object
-
#initialize(parent, name) ⇒ ExplainScope
constructor
A new instance of ExplainScope.
- #to_hash ⇒ Object
- #type ⇒ Object
Methods inherited from ExplainTreeNode
#dump_outcome, #dump_value, #found, #found_in_defaults, #found_in_overrides, #increase_indent, #location_not_found, #not_found, #result, #to_s
Methods inherited from ExplainNode
#branches, #dump_texts, #explain, #inspect, #text, #to_s
Constructor Details
#initialize(parent, name) ⇒ ExplainScope
Returns a new instance of ExplainScope.
439 440 441 442 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 439 def initialize(parent, name) super(parent) @name = name end |
Instance Method Details
#dump_on(io, indent, first_indent) ⇒ Object
444 445 446 447 448 449 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 444 def dump_on(io, indent, first_indent) io << indent << @name << "\n" indent = increase_indent(indent) branches.each {|b| b.dump_on(io, indent, indent)} dump_outcome(io, indent) end |
#to_hash ⇒ Object
451 452 453 454 455 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 451 def to_hash hash = super hash[:name] = @name hash end |
#type ⇒ Object
457 458 459 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 457 def type :scope end |