Sha256: 14d1cb615d22dc5487ae5908e61d2666102641cd0eb4ac10b7afb765205b5483

Contents?: true

Size: 430 Bytes

Versions: 12

Compression:

Stored size: 430 Bytes

Contents

module Rubix
  module Associations
    module HasManyConditions

      def self.included klass
        klass.send(:zabbix_attr, :condition_operator, :default => :and_or, :required => true)
      end

      def conditions
        @conditions ||= []
      end

      def conditions= cs
        @conditions = cs.map do |c|
          c.kind_of?(Condition) ? c : Condition.new(c)
        end
      end
      
    end
  end
end

      

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
rubix-0.5.14 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.13 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.9 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.8 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.7 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.6 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.5 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.4 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.3 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.2 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.1 lib/rubix/associations/has_many_conditions.rb
rubix-0.5.0 lib/rubix/associations/has_many_conditions.rb