Class: Puppet::Parser::AST::Else
- Inherits:
-
Branch
- Object
- Puppet::Parser::AST
- Branch
- Puppet::Parser::AST::Else
- Defined in:
- lib/vendor/puppet/parser/ast/else.rb
Overview
A separate ElseIf statement; can function as an ‘else’ if there’s no test.
Constant Summary
Constants inherited from Puppet::Parser::AST
Constants included from Util::Docs
Instance Attribute Summary collapse
-
#statements ⇒ Object
Returns the value of attribute statements.
Attributes inherited from Branch
Attributes inherited from Puppet::Parser::AST
Attributes included from Util::Docs
Instance Method Summary collapse
- #each {|@statements| ... } ⇒ Object
-
#evaluate(scope) ⇒ Object
Evaluate the actual statements; this only gets called if our test was true matched.
Methods inherited from Branch
Methods inherited from Puppet::Parser::AST
associates_doc, #evaluate_match, #initialize, #inspect, #parsefail, #parsewrap, #safeevaluate, settor?, #use_docs
Methods included from Util::Docs
#desc, #dochook, #doctable, #markdown_definitionlist, #markdown_header, #nodoc?, #pad, scrub
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::Branch
Instance Attribute Details
#statements ⇒ Object
Returns the value of attribute statements.
10 11 12 |
# File 'lib/vendor/puppet/parser/ast/else.rb', line 10 def statements @statements end |
Instance Method Details
#each {|@statements| ... } ⇒ Object
12 13 14 |
# File 'lib/vendor/puppet/parser/ast/else.rb', line 12 def each yield @statements end |
#evaluate(scope) ⇒ Object
Evaluate the actual statements; this only gets called if our test was true matched.
18 19 20 |
# File 'lib/vendor/puppet/parser/ast/else.rb', line 18 def evaluate(scope) @statements.safeevaluate(scope) end |