Method: Puppet::Parser::AST::Regex#evaluate

Defined in:
lib/puppet/parser/ast/leaf.rb

#evaluate(scope) ⇒ Object

we’re returning self here to wrap the regexp and to be used in places where a string would have been used, without modifying any client code. For instance, in many places we have the following code snippet:

val = @val.safeevaluate(@scope)
if val.match(otherval)
    ...
end

this way, we don’t have to modify this test specifically for handling regexes.



73
74
75
# File 'lib/puppet/parser/ast/leaf.rb', line 73

def evaluate(scope)
  self
end