Class: Puppet::Parser::AST::Leaf
- Inherits:
-
Puppet::Parser::AST
- Object
- Puppet::Parser::AST
- Puppet::Parser::AST::Leaf
- Defined in:
- lib/puppet/parser/ast/leaf.rb
Overview
The base class for all of the leaves of the parse trees. These basically just have types and values. Both of these parameters are simple values, not AST objects.
Direct Known Subclasses
Constant Summary
Constants inherited from Puppet::Parser::AST
Instance Attribute Summary collapse
Attributes inherited from Puppet::Parser::AST
#file, #line, #parent, #pos, #scope
Instance Method Summary collapse
-
#evaluate(scope) ⇒ Object
Return our value.
- #match(value) ⇒ Object
- #to_s ⇒ Object
Methods inherited from Puppet::Parser::AST
#initialize, #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
This class inherits a constructor from Puppet::Parser::AST
Instance Attribute Details
Instance Method Details
#evaluate(scope) ⇒ Object
Return our value.
8 9 10 |
# File 'lib/puppet/parser/ast/leaf.rb', line 8 def evaluate(scope) @value end |
#match(value) ⇒ Object
12 13 14 |
# File 'lib/puppet/parser/ast/leaf.rb', line 12 def match(value) @value == value end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/puppet/parser/ast/leaf.rb', line 16 def to_s @value.to_s unless @value.nil? end |