Sha256: a96dbee56f0f8898bc46b294744fec982cc578878feea31ef96304122c65d8d0

Contents?: true

Size: 347 Bytes

Versions: 33

Compression:

Stored size: 347 Bytes

Contents

module Mongoid
  module Matcher

    # @api private
    module BitsAnyClear
      include Bits
      extend self

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

      def int_matches?(value, condition)
        value & condition < condition
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
mongoid-8.1.9 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.0.9 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.8 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.7 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.6 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.0.8 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.5 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.4 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.0.7 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.3 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.2 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.0.6 lib/mongoid/matcher/bits_any_clear.rb
mongoid-7.5.4 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.1 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.0.5 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.1.0 lib/mongoid/matcher/bits_any_clear.rb
mongoid-7.5.3 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.0.4 lib/mongoid/matcher/bits_any_clear.rb
mongoid-8.0.3 lib/mongoid/matcher/bits_any_clear.rb
mongoid-7.5.2 lib/mongoid/matcher/bits_any_clear.rb