Method: Puppet::Parser::Scope#enclosing_scope
- Defined in:
- lib/puppet/parser/scope.rb
#enclosing_scope ⇒ Puppet::Parser::Scope
The enclosing scope (topscope or nodescope) of this scope. The enclosing scopes are produced when a class or define is included at some point. The parent scope of the included class or define becomes the scope in which it was included. The chain of parent scopes is followed until a node scope or the topscope is found
581 582 583 584 585 586 587 588 589 |
# File 'lib/puppet/parser/scope.rb', line 581 def enclosing_scope if has_enclosing_scope? if parent.is_topscope? || parent.is_nodescope? parent else parent.enclosing_scope end end end |