Method: Puppet::Parser::Scope#find_global_scope
- Defined in:
- lib/puppet/parser/scope.rb
#find_global_scope ⇒ Object
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/puppet/parser/scope.rb', line 352 def find_global_scope # walk upwards until first found node_scope or top_scope if is_nodescope? || is_topscope? self else next_scope = inherited_scope || enclosing_scope if next_scope.nil? # this happens when testing, and there is only a single test scope and no link to any # other scopes self else next_scope.find_global_scope() end end end |