Class | Puppet::Parser::Scope |
In: |
lib/puppet/parser/scope.rb
|
Parent: | Object |
AST | = | Puppet::Parser::AST |
base | [RW] | |
compiler | [RW] | |
keyword | [RW] | |
level | [RW] | |
nodescope | [RW] | |
parent | [W] | |
parser | [RW] | |
resource | [RW] | |
source | [RW] | |
top | [RW] | |
translated | [RW] |
Collect all of the defaults set at any higher scopes. This is a different type of lookup because it‘s additive — it collects all of the defaults, with defaults in closer scopes overriding those in later scopes.
Look up a variable. The simplest value search we do. Default to returning an empty string for missing values, but support returning a constant.
Is this class for a node? This is used to make sure that nodes and classes with the same name conflict (620), which is required because of how often the names are used throughout the system, including on the client.
Return the list of scopes up to the top scope, ordered with our own first. This is used for looking up variables and defaults.
Set defaults for a type. The typename should already be downcased, so that the syntax is isolated. We don‘t do any kind of type-checking here; instead we let the resource do it when the defaults are used.
Set a variable in the current scope. This will override settings in scopes above, but will not allow variables in the current scope to be reassigned.