module Rulz module Conditions module Container def self.load_conditions(reciever, attr) reciever.class_eval do define_rulz do attribute attr do condition "contains" do |other| send(attr).include? other end condition "does not contain" do |other| opposite_of "contains", other end end end end end def self.included(base) base.class_eval do define_rulz do condition "contains" do |other| it.include? other end condition "does not contain" do |other| opposite_of "contains", other end end end end end end end