Class: Puppet::Parser::AST::Branch Private
- Inherits:
-
Puppet::Parser::AST
- Object
- Puppet::Parser::AST
- Puppet::Parser::AST::Branch
- Includes:
- Enumerable
- Defined in:
- lib/puppet/parser/ast/branch.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
The parent class of all AST objects that contain other AST objects. Everything but the really simple objects descend from this. It is important to note that Branch objects contain other AST objects only – if you want to contain values, use a descendant of the AST::Leaf class.
Direct Known Subclasses
Constant Summary
Constants inherited from Puppet::Parser::AST
Instance Attribute Summary collapse
- #children ⇒ Object private
- #pin ⇒ Object private
Attributes inherited from Puppet::Parser::AST
#file, #line, #parent, #pos, #scope
Instance Method Summary collapse
- #each ⇒ Object private
-
#initialize(children: [], **args) ⇒ Branch
constructor
private
A new instance of Branch.
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(children: [], **args) ⇒ Branch
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Branch.
17 18 19 20 |
# File 'lib/puppet/parser/ast/branch.rb', line 17 def initialize(children: [], **args) @children = children super(**args) end |
Instance Attribute Details
#children ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/puppet/parser/ast/branch.rb', line 11 def children @children end |
#pin ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/puppet/parser/ast/branch.rb', line 11 def pin @pin end |
Instance Method Details
#each ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 |
# File 'lib/puppet/parser/ast/branch.rb', line 13 def each @children.each { |child| yield child } end |