Class: Puppet::Parser::AST::PopsBridge::ExpressionSupportingReturn

Inherits:
Expression show all
Defined in:
lib/puppet/parser/ast/pops_bridge.rb

Constant Summary

Constants inherited from Puppet::Parser::AST

AST

Instance Attribute Summary

Attributes inherited from Leaf

#type, #value

Attributes inherited from Puppet::Parser::AST

#file, #line, #parent, #pos, #scope

Instance Method Summary collapse

Methods inherited from Expression

#children, #each, #sequence_with, #source_text, #to_s

Methods inherited from Leaf

#match, #to_s

Methods inherited from Puppet::Parser::AST

#inspect, #safeevaluate

Methods included from Util::Errors

#adderrorcontext, #devfail, #error_context, error_location, error_location_with_space, error_location_with_unknowns, #exceptwrap, #fail

Constructor Details

#initialize(args) ⇒ ExpressionSupportingReturn

Returns a new instance of ExpressionSupportingReturn.


60
61
62
# File 'lib/puppet/parser/ast/pops_bridge.rb', line 60

def initialize args
  super
end

Instance Method Details

#evaluate(scope) ⇒ Object


64
65
66
67
68
69
70
# File 'lib/puppet/parser/ast/pops_bridge.rb', line 64

def evaluate(scope)
  return catch(:return) do
    return catch(:next) do
      return super(scope)
    end
  end
end