Method: Puppet::Parser::Scope#class_scope
- Defined in:
- lib/puppet/parser/scope.rb
#class_scope(klass) ⇒ Object
Return the scope associated with a class. This is just here so that subclasses can set their parent scopes to be the scope of their parent class, and it’s also used when looking up qualified variables.
417 418 419 420 421 |
# File 'lib/puppet/parser/scope.rb', line 417 def class_scope(klass) # They might pass in either the class or class name k = klass.respond_to?(:name) ? klass.name : klass @class_scopes[k] || (parent && parent.class_scope(k)) end |