Sha256: f46a32d139e1fa572b1c7edc2c6078de0b361a42fe5c6dc730ade314eb145394
Contents?: true
Size: 822 Bytes
Versions: 6
Compression:
Stored size: 822 Bytes
Contents
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
Version data entries
6 entries across 6 versions & 1 rubygems