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 174 def initialize(evaluator, model, scope) 175 @enclosing_scope = scope 176 super(evaluator, model) 177 end
Public Instance Methods
call(*args)
click to toggle source
# File lib/puppet/pops/evaluator/closure.rb 183 def call(*args) 184 # A return from an unnamed closure is treated as a return from the context evaluating 185 # calling this closure - that is, as if it was the return call itself. 186 # 187 jumper = catch(:return) do 188 return call_with_scope(enclosing_scope, args) 189 end 190 raise jumper 191 end
enclosing_scope()
click to toggle source
# File lib/puppet/pops/evaluator/closure.rb 179 def enclosing_scope 180 @enclosing_scope 181 end