# File lib/puppet/parser/ast/in_operator.rb, line 11 11: def evaluate(scope) 12: 13: # evaluate the operands, should return a boolean value 14: lval = @lval.safeevaluate(scope) 15: raise ArgumentError, "'#{lval}' from left operand of 'in' expression is not a string" unless lval.is_a?(::String) 16: 17: rval = @rval.safeevaluate(scope) 18: unless rval.respond_to?(:include?) 19: raise ArgumentError, "'#{rval}' from right operand of 'in' expression is not of a supported type (string, array or hash)" 20: end 21: rval.include?(lval) 22: end