Class: Puppet::Parser::AST::Function

Inherits:
AST::Branch
  • Object
show all
Defined in:
lib/fizzgig/function_stubs.rb

Instance Method Summary collapse

Instance Method Details

#evaluate(scope) ⇒ Object



18
19
20
21
22
23
24
25
26
27
# File 'lib/fizzgig/function_stubs.rb', line 18

def evaluate(scope)
  #FIXME: are there implications around potential
  #double-evaluation here?
  args = @arguments.safeevaluate(scope).map { |x| x == :undef ? '' : x }
  if Fizzgig::FunctionStubs.has_stub?(@name,args)
    Fizzgig::FunctionStubs.get_stub(@name,args)
  else
    orig_evaluate(scope)
  end
end

#orig_evaluateObject



16
# File 'lib/fizzgig/function_stubs.rb', line 16

alias_method :orig_evaluate, :evaluate