Class: RuleProcessor
- Inherits:
-
Object
- Object
- RuleProcessor
- Defined in:
- lib/rast/rules/rule_processor.rb
Overview
undoc
Instance Method Summary collapse
-
#evaluate(scenario: []) ⇒ Object
/** * @param scenario current scenario.
-
#initialize(rule: nil, token_converters: {}) ⇒ RuleProcessor
constructor
A new instance of RuleProcessor.
Constructor Details
#initialize(rule: nil, token_converters: {}) ⇒ RuleProcessor
Returns a new instance of RuleProcessor.
7 8 9 10 |
# File 'lib/rast/rules/rule_processor.rb', line 7 def initialize(rule: nil, token_converters: {}) @rule = rule @token_converters = token_converters end |
Instance Method Details
#evaluate(scenario: []) ⇒ Object
/**
* @param scenario current scenario.
*
* @return the outcome results against the given scenario.
*/
17 18 19 20 21 22 23 24 25 |
# File 'lib/rast/rules/rule_processor.rb', line 17 def evaluate(scenario: []) @rule.outcomes.inject([]) do |retval, outcome| process_outcome( list: retval, scenario: scenario, outcome: outcome ) end end |