Class: Puppet::Pops::Parser::EvaluatingParser::Transitional
- Inherits:
-
Puppet::Pops::Parser::EvaluatingParser
- Object
- Puppet::Pops::Parser::EvaluatingParser
- Puppet::Pops::Parser::EvaluatingParser::Transitional
- Defined in:
- lib/puppet/pops/parser/evaluating_parser.rb
Overview
This is a temporary solution to making it possible to use the new evaluator. The main class will eventually have this behavior instead of using transformation to Puppet 3.x AST
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from Puppet::Pops::Parser::EvaluatingParser
Instance Method Summary collapse
-
#closure(model, scope) ⇒ Object
Create a closure that can be called in the given scope.
- #evaluate(scope, model) ⇒ Object
- #evaluator ⇒ Object
- #validator(acceptor) ⇒ Object
Methods inherited from Puppet::Pops::Parser::EvaluatingParser
#acceptor, #assert_and_report, #clear, #evaluate_file, #evaluate_string, #initialize, #parse_file, #parse_string, #quote, quote, #validate
Constructor Details
This class inherits a constructor from Puppet::Pops::Parser::EvaluatingParser
Instance Method Details
#closure(model, scope) ⇒ Object
Create a closure that can be called in the given scope
190 191 192 |
# File 'lib/puppet/pops/parser/evaluating_parser.rb', line 190 def closure(model, scope) Puppet::Pops::Evaluator::Closure.new(evaluator, model, scope) end |
#evaluate(scope, model) ⇒ Object
180 181 182 183 |
# File 'lib/puppet/pops/parser/evaluating_parser.rb', line 180 def evaluate(scope, model) return nil unless model evaluator.evaluate(model, scope) end |
#evaluator ⇒ Object
175 176 177 178 |
# File 'lib/puppet/pops/parser/evaluating_parser.rb', line 175 def evaluator @@evaluator ||= Puppet::Pops::Evaluator::EvaluatorImpl.new() @@evaluator end |
#validator(acceptor) ⇒ Object
185 186 187 |
# File 'lib/puppet/pops/parser/evaluating_parser.rb', line 185 def validator(acceptor) Puppet::Pops::Validation::ValidatorFactory_4_0.new().validator(acceptor) end |