Class Puppet::Parser::AST::Node
In: lib/puppet/parser/ast/node.rb
Parent: Puppet::Parser::AST::HostClass

The specific code associated with a host. Nodes are annoyingly unlike other objects. That‘s just the way it is, at least for now.

Methods

namespace   new   subscope  

Public Class methods

[Source]

    # File lib/puppet/parser/ast/node.rb, line 8
 8:     def initialize(options)
 9:         @parentclass = nil
10:         super
11: 
12:         # Do some validation on the node name
13:         if @name =~ /[^-\w.]/
14:             raise Puppet::ParseError, "Invalid node name %s" % @name
15:         end
16:     end

Public Instance methods

[Source]

    # File lib/puppet/parser/ast/node.rb, line 18
18:     def namespace
19:         ""
20:     end

Make sure node scopes are marked as such.

[Source]

    # File lib/puppet/parser/ast/node.rb, line 23
23:     def subscope(*args)
24:         scope = super
25:         scope.nodescope = true
26:         scope
27:     end

[Validate]