module Mongoid::Matcher::Ne

@api private

Public Instance Methods

matches?(exists, value, condition) click to toggle source
# File lib/mongoid/matcher/ne.rb, line 6
                def matches?(exists, value, condition)
  case condition
  when ::Regexp, BSON::Regexp::Raw
    raise Errors::InvalidQuery, "'$ne' operator does not allow Regexp arguments: #{Errors::InvalidQuery.truncate_expr(condition)}"
  end

  !EqImpl.matches?(exists, value, condition, '$ne')
end