module LightRulesEngine
Constants
- VERSION
Public Class Methods
applicable_conditions?(data_container, conditions)
click to toggle source
# File lib/light_rules_engine.rb, line 20 def self.applicable_conditions?(data_container, conditions) ConditionsApplicableChecker.new(data_container: data_container, conditions: conditions).applable? end
config()
click to toggle source
# File lib/light_rules_engine.rb, line 12 def self.config @config || Config::DEFAULT_CONFIG end
setup_config(opts = {})
click to toggle source
# File lib/light_rules_engine.rb, line 16 def self.setup_config(opts = {}) @config = Config::DEFAULT_CONFIG.merge(opts) end
Public Instance Methods
rules_applicable?(data_container, *rules)
click to toggle source
# File lib/light_rules_engine.rb, line 24 def rules_applicable?(data_container, *rules) rules.map do |rule| rule if rules_applicable?(data_container, rule.conditions) end.compact end