Class: Puppet::Pops::Lookup::ExplainInterpolate

Inherits:
ExplainTreeNode show all
Defined in:
lib/puppet/pops/lookup/explainer.rb

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, #module_not_found, #not_found, #path_not_found, #result

Methods inherited from ExplainNode

#branches, #to_s

Constructor Details

#initialize(parent, expression) ⇒ ExplainInterpolate

Returns a new instance of ExplainInterpolate.



187
188
189
190
# File 'lib/puppet/pops/lookup/explainer.rb', line 187

def initialize(parent, expression)
  super(parent)
  @expression = expression
end

Instance Method Details

#dump_on(io, indent, first_indent) ⇒ Object



192
193
194
195
196
# File 'lib/puppet/pops/lookup/explainer.rb', line 192

def dump_on(io, indent, first_indent)
  io << first_indent << 'Interpolation on "' << @expression << "\"\n"
  indent = increase_indent(indent)
  branches.each {|b| b.dump_on(io, indent, indent)}
end

#to_hashObject



198
199
200
201
202
# File 'lib/puppet/pops/lookup/explainer.rb', line 198

def to_hash
  hash = super
  hash[:expression] = @expression
  hash
end

#typeObject



204
205
206
# File 'lib/puppet/pops/lookup/explainer.rb', line 204

def type
  :interpolate
end