Class: Puppet::Pops::Lookup::ExplainMergeSource

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from ExplainNode

#branches, #dump_texts, #explain, #inspect, #text, #to_s

Constructor Details

#initialize(merge_source) ⇒ ExplainMergeSource

Returns a new instance of ExplainMergeSource.



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

def initialize(merge_source)
  @merge_source = merge_source
end

Instance Attribute Details

#merge_sourceObject (readonly)

Returns the value of attribute merge_source.



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

def merge_source
  @merge_source
end

Instance Method Details

#dump_on(io, indent, first_indent) ⇒ Object



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

def dump_on(io, indent, first_indent)
  io << first_indent << 'Using merge options from "' << merge_source << "\" hash\n"
end

#to_hashObject



202
203
204
# File 'lib/puppet/pops/lookup/explainer.rb', line 202

def to_hash
  { :type => type, :merge_source => merge_source }
end

#typeObject



206
207
208
# File 'lib/puppet/pops/lookup/explainer.rb', line 206

def type
  :merge_source
end