Class: Puppet::Parser::AST::Concat

Inherits:
Leaf show all
Defined in:
lib/puppet/parser/ast/leaf.rb

Instance Attribute Summary

Attributes inherited from Leaf

#type, #value

Instance Method Summary collapse

Methods inherited from Leaf

#match

Instance Method Details

#evaluate(scope) ⇒ Object



58
59
60
# File 'lib/puppet/parser/ast/leaf.rb', line 58

def evaluate(scope)
  @value.collect { |x| x.evaluate(scope) }.collect{ |x| x == :undef ? '' : x }.join
end

#to_sObject



62
63
64
# File 'lib/puppet/parser/ast/leaf.rb', line 62

def to_s
  "#{@value.map { |s| s.to_s.gsub(/^"(.*)"$/, '\1') }.join}"
end