Class: Puppet::Pops::Lookup::ExplainDataProvider Private
- Inherits:
-
ExplainTreeNode
- Object
- ExplainNode
- ExplainTreeNode
- Puppet::Pops::Lookup::ExplainDataProvider
- Defined in:
- lib/puppet/pops/lookup/explainer.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary
Attributes inherited from ExplainTreeNode
Instance Method Summary collapse
- #dump_on(io, indent, first_indent) ⇒ Object private
-
#initialize(parent, provider) ⇒ ExplainDataProvider
constructor
private
A new instance of ExplainDataProvider.
- #to_hash ⇒ Object private
- #type ⇒ Object private
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, provider) ⇒ ExplainDataProvider
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ExplainDataProvider.
340 341 342 343 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 340 def initialize(parent, provider) super(parent) @provider = provider end |
Instance Method Details
#dump_on(io, indent, first_indent) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
345 346 347 348 349 350 351 352 353 354 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 345 def dump_on(io, indent, first_indent) io << first_indent << @provider.name << "\n" indent = increase_indent(indent) if @provider.respond_to?(:config_path) path = @provider.config_path io << indent << 'Using configuration "' << path.to_s << "\"\n" unless path.nil? end branches.each { |b| b.dump_on(io, indent, indent) } dump_outcome(io, indent) end |
#to_hash ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
356 357 358 359 360 361 362 363 364 365 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 356 def to_hash hash = super hash[:name] = @provider.name if @provider.respond_to?(:config_path) path = @provider.config_path hash[:configuration_path] = path.to_s unless path.nil? end hash[:module] = @provider.module_name if @provider.is_a?(ModuleDataProvider) hash end |
#type ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
367 368 369 |
# File 'lib/puppet/pops/lookup/explainer.rb', line 367 def type :data_provider end |