Class: Puppet::Pops::Lookup::DebugExplainer
- Inherits:
-
Explainer
- Object
- ExplainNode
- Explainer
- Puppet::Pops::Lookup::DebugExplainer
- Defined in:
- lib/puppet/pops/lookup/explainer.rb
Instance Attribute Summary collapse
- #wrapped_explainer ⇒ Object readonly
Instance Method Summary collapse
- #emit_debug_info(preamble) ⇒ Object
-
#initialize(wrapped_explainer) ⇒ DebugExplainer
constructor
A new instance of DebugExplainer.
Methods inherited from Explainer
#accept_found, #accept_found_in_defaults, #accept_found_in_overrides, #accept_merge_source, #accept_module_not_found, #accept_not_found, #accept_path_not_found, #accept_result, #accept_text, #dump_on, #explain_options?, #only_explain_options?, #pop, #push, #to_hash
Methods inherited from ExplainNode
#branches, #dump_on, #to_hash, #to_s
Constructor Details
#initialize(wrapped_explainer) ⇒ DebugExplainer
Returns a new instance of DebugExplainer.
529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 529 def initialize(wrapped_explainer) @wrapped_explainer = wrapped_explainer if wrapped_explainer.nil? @current = self = false = false else @current = wrapped_explainer = wrapped_explainer. = wrapped_explainer. end end |
Instance Attribute Details
#wrapped_explainer ⇒ Object (readonly)
527 528 529 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 527 def wrapped_explainer @wrapped_explainer end |
Instance Method Details
#emit_debug_info(preamble) ⇒ Object
542 543 544 545 546 547 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 542 def emit_debug_info(preamble) io = '' io << preamble << "\n" @current.dump_on(io, ' ', ' ') Puppet.debug(io.chomp!) end |