class Puppet::Pops::Evaluator::Closure::Dynamic
Public Class Methods
new(evaluator, model, scope)
click to toggle source
Calls superclass method
Puppet::Pops::Evaluator::Closure::new
# File lib/puppet/pops/evaluator/closure.rb 175 def initialize(evaluator, model, scope) 176 @enclosing_scope = scope 177 super(evaluator, model) 178 end
Public Instance Methods
call(*args)
click to toggle source
# File lib/puppet/pops/evaluator/closure.rb 184 def call(*args) 185 # A return from an unnamed closure is treated as a return from the context evaluating 186 # calling this closure - that is, as if it was the return call itself. 187 # 188 jumper = catch(:return) do 189 return call_with_scope(enclosing_scope, args) 190 end 191 raise jumper 192 end
enclosing_scope()
click to toggle source
# File lib/puppet/pops/evaluator/closure.rb 180 def enclosing_scope 181 @enclosing_scope 182 end