class Noteikumi::RuleExecutionScope
A class that exist to execute the logic of the rule @api private
Attributes
logger[R]
The active logger @return [Logger]
rule[R]
The rule being ran @return [Rule]
state[R]
The state the rule is processing @return [State]
Public Class Methods
new(rule)
click to toggle source
Creates a new scope object
@param rule [Rule] @return [RuleExecutionScope
# File lib/noteikumi/rule_execution_scope.rb, line 21 def initialize(rule) @rule = rule @state = rule.state @logger = rule.logger end
Public Instance Methods
run()
click to toggle source
Runs the rule logic within this scope
@return [Object] the output from the rule
# File lib/noteikumi/rule_execution_scope.rb, line 30 def run @rule.run_logic.call end