Sha256: b17ac2f43750aeab4098bce2325d61d4f0ed93e84ab188496fa4ba23aa0c30fb
Contents?: true
Size: 824 Bytes
Versions: 5
Compression:
Stored size: 824 Bytes
Contents
require '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. class Puppet::Parser::AST::Node < Puppet::Parser::AST::HostClass @name = :node def initialize(options) @parentclass = nil super # Do some validation on the node name if @name =~ /[^-\w.]/ raise Puppet::ParseError, "Invalid node name %s" % @name end end def namespace "" end # Make sure node scopes are marked as such. def subscope(*args) scope = super scope.nodescope = true scope end private # Search for the object matching our parent class. def find_parentclass @parser.findnode(parentclass) end end
Version data entries
5 entries across 5 versions & 1 rubygems