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 descendent 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(arghash) ⇒ Branch
constructor
private
A new instance of Branch.
Methods included from Enumerable
Methods inherited from Puppet::Parser::AST
#evaluate, #inspect, #safeevaluate
Methods included from Util::MethodHelper
#requiredopts, #set_options, #symbolize_options
Methods included from Util::Errors
#adderrorcontext, #devfail, #error_context, #exceptwrap, #fail
Constructor Details
#initialize(arghash) ⇒ 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.
15 16 17 18 |
# File 'lib/puppet/parser/ast/branch.rb', line 15 def initialize(arghash) super(arghash) @children ||= [] 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.
9 10 11 |
# File 'lib/puppet/parser/ast/branch.rb', line 9 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.
9 10 11 |
# File 'lib/puppet/parser/ast/branch.rb', line 9 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.
11 12 13 |
# File 'lib/puppet/parser/ast/branch.rb', line 11 def each @children.each { |child| yield child } end |