module Mongoid::Matcher::BitsAllSet
@api private
Public Instance Methods
array_matches?(value, condition)
click to toggle source
# File lib/mongoid/matcher/bits_all_set.rb, line 9 def array_matches?(value, condition) condition.all? do |c| value & (1<<c) > 0 end end
int_matches?(value, condition)
click to toggle source
# File lib/mongoid/matcher/bits_all_set.rb, line 15 def int_matches?(value, condition) value & condition == condition end