lib/rules/rule_set.rb
# TODO: Arbitrary rule set logic (Treetop)
Arbitrary rule set logic (Treetop)
Arbitrary rule set logic ( Treetop )
def evaluate(attributes = {})
      return true unless rules.any?
      if evaluation_logic == 'any'
        !!rules.detect { |rule| rule.evaluate(attributes) }
      else
        rules.each do |rule|
          return false unless rule.evaluate(attributes)
        end
        true
      end
    end
def evaluate ( attributes = { } ) return true unless rules . any? if evaluation_logic == 'any' ! ! rules . detect { | rule | rule . evaluate ( attributes ) } else rules . each do | rule | return false unless rule . evaluate ( attributes ) end true end end
TODO: Arbitrary rule set logic (Treetop)
TODO : Arbitrary rule set logic ( Treetop )
attributes
<not_specific>