Class: Puppet::Parser::CodeMerger
- Defined in:
- lib/puppet/parser/code_merger.rb
Instance Method Summary collapse
-
#concatenate(parse_results) ⇒ Object
Concatenates the logic in the array of parse results into one parse result.
Instance Method Details
#concatenate(parse_results) ⇒ Object
Concatenates the logic in the array of parse results into one parse result
7 8 9 10 11 12 |
# File 'lib/puppet/parser/code_merger.rb', line 7 def concatenate(parse_results) children = parse_results.select {|x| !x.nil? && x.code}.reduce([]) do |memo, parsed_class| memo + parsed_class.code.children end Puppet::Parser::AST::BlockExpression.new(:children => children) end |