Class: Puppet::Parser::AST::Node
- Inherits:
-
TopLevelConstruct
- Object
- Puppet::Parser::AST
- TopLevelConstruct
- Puppet::Parser::AST::Node
- Defined in:
- lib/puppet/parser/ast/node.rb
Constant Summary
Constants inherited from Puppet::Parser::AST
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#names ⇒ Object
Returns the value of attribute names.
Attributes inherited from Puppet::Parser::AST
#file, #line, #parent, #pos, #scope
Instance Method Summary collapse
-
#initialize(names, context = {}) ⇒ Node
constructor
A new instance of Node.
- #instantiate(modname) ⇒ Object
Methods inherited from Puppet::Parser::AST
#evaluate, #inspect, #safeevaluate
Methods included from Util::Errors
#adderrorcontext, #devfail, #error_context, error_location, error_location_with_space, error_location_with_unknowns, #exceptwrap, #fail
Constructor Details
#initialize(names, context = {}) ⇒ Node
Returns a new instance of Node.
6 7 8 9 10 11 12 13 14 |
# File 'lib/puppet/parser/ast/node.rb', line 6 def initialize(names, context = {}) raise ArgumentError, _("names should be an array") unless names.is_a? Array if context[:parent] raise Puppet::DevError, _("Node inheritance is removed in Puppet 4.0.0. See http://links.puppet.com/puppet-node-inheritance-deprecation") end @names = names @context = context end |