Sha256: 66e449eac499230e0be3048626c128c529fc2cffbce215c2290a5f8095289fba
Contents?: true
Size: 469 Bytes
Versions: 12
Compression:
Stored size: 469 Bytes
Contents
# frozen_string_literal: true # Evaluates contained expressions, produce result of the last # class Puppet::Parser::AST::BlockExpression < Puppet::Parser::AST::Branch def evaluate(scope) @children.reduce(nil) { |_, child| child.safeevaluate(scope) } end def sequence_with(other) Puppet::Parser::AST::BlockExpression.new(:children => self.children + other.children) end def to_s "[" + @children.collect { |c| c.to_s }.join(', ') + "]" end end
Version data entries
12 entries across 12 versions & 1 rubygems