lib/puppet/parser/ast/arithmetic_operator.rb
# Produces an object which is the result of the applying the operator to the of lval and rval operands.
# * Supports +, -, *, /, %, and <<, >> on numeric strings.
# * Supports + on arrays (concatenate), and hashes (merge)
# * Supports << on arrays (append)
#
Produces an object which is the result of the applying the operator to the of lval and rval operands.
Produces an object which is the result of the applying the operator to the of lval and rval operands .
def evaluate(scope)
      left = @lval.safeevaluate(scope)
      right = @rval.safeevaluate(scope)
      if left.is_a?(Array) || right.is_a?(Array)
        eval_array(left, right)
      elsif left.is_a?(Hash) || right.is_a?(Hash)
        eval_hash(left, right)
      else
        eval_numeric(left, right)
      end
    end
def evaluate ( scope ) left = @lval . safeevaluate ( scope ) right = @rval . safeevaluate ( scope ) if left . is_a? ( Array ) || right . is_a? ( Array ) eval_array ( left , right ) elsif left . is_a? ( Hash ) || right . is_a? ( Hash ) eval_hash ( left , right ) else eval_numeric ( left , right ) end end
Produces an object which is the result of the applying the operator to the of lval and rval operands.
Produces an object which is the result of the applying the operator to the of lval and rval operands .
# evaluate the operands, should return a boolean value
scope
<not_specific>