Class: Puppet::Pops::Lookup::ExplainGlobal Private

Inherits:
ExplainTreeNode show all
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

#event, #key, #parent, #value

Instance Method Summary collapse

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, binding_terminus) ⇒ ExplainGlobal

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 ExplainGlobal.



316
317
318
319
# File 'lib/puppet/pops/lookup/explainer.rb', line 316

def initialize(parent, binding_terminus)
  super(parent)
  @binding_terminus = binding_terminus
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.



321
322
323
324
325
326
# File 'lib/puppet/pops/lookup/explainer.rb', line 321

def dump_on(io, indent, first_indent)
  io << first_indent << 'Data Binding "' << @binding_terminus.to_s << "\"\n"
  indent = increase_indent(indent)
  branches.each { |b| b.dump_on(io, indent, indent) }
  dump_outcome(io, indent)
end

#to_hashObject

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.



328
329
330
331
332
# File 'lib/puppet/pops/lookup/explainer.rb', line 328

def to_hash
  hash = super
  hash[:name] = @binding_terminus
  hash
end

#typeObject

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.



334
335
336
# File 'lib/puppet/pops/lookup/explainer.rb', line 334

def type
  :global
end