Method: Puppet::Parser::Compiler#newscope

Defined in:
lib/puppet/parser/compiler.rb

#newscope(parent, options = {}) ⇒ Object

Create a new scope, with either a specified parent scope or using the top scope.



287
288
289
290
291
292
# File 'lib/puppet/parser/compiler.rb', line 287

def newscope(parent, options = {})
  parent ||= topscope
  scope = Puppet::Parser::Scope.new(self, **options)
  scope.parent = parent
  scope
end