Class: Puppet::Parser::AST::Else
- Defined in:
- lib/puppet/parser/ast/else.rb
Overview
A separate ElseIf statement; can function as an ‘else’ if there’s no test.
Instance Attribute Summary collapse
Attributes inherited from Branch
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
Constructor Details
This class inherits a constructor from Puppet::Parser::AST::Branch
Instance Attribute Details
#statements ⇒ Object
10 11 12 |
# File 'lib/puppet/parser/ast/else.rb', line 10 def statements @statements end |
Instance Method Details
#each {|@statements| ... } ⇒ Object
12 13 14 |
# File 'lib/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/puppet/parser/ast/else.rb', line 18 def evaluate(scope) @statements.safeevaluate(scope) end |