Sha256: c6186e06f0825fa6d42d9076b4e374186b32650e1698784616d5d0ad278f13eb

Contents?: true

Size: 340 Bytes

Versions: 30

Compression:

Stored size: 340 Bytes

Contents

module Mongoid
  module Matcher

    # @api private
    module BitsAllClear
      include Bits
      extend self

      def array_matches?(value, condition)
        condition.all? do |c|
          value & (1<<c) == 0
        end
      end

      def int_matches?(value, condition)
        value & condition == 0
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
mongoid-8.1.7 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.1.6 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.0.8 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.1.5 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.1.4 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.0.7 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.1.3 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.1.2 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.0.6 lib/mongoid/matcher/bits_all_clear.rb
mongoid-7.5.4 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.1.1 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.0.5 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.1.0 lib/mongoid/matcher/bits_all_clear.rb
mongoid-7.5.3 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.0.4 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.0.3 lib/mongoid/matcher/bits_all_clear.rb
mongoid-7.5.2 lib/mongoid/matcher/bits_all_clear.rb
mongoid-8.0.2 lib/mongoid/matcher/bits_all_clear.rb
mongoid-7.5.1 lib/mongoid/matcher/bits_all_clear.rb
mongoid-7.4.3 lib/mongoid/matcher/bits_all_clear.rb