module Mongoid::Matcher::Exists
@api private
Public Instance Methods
matches?(exists, value, condition)
click to toggle source
# File lib/mongoid/matcher/exists.rb, line 6 def matches?(exists, value, condition) case condition when Range raise Errors::InvalidQuery, "$exists argument cannot be a Range: #{Errors::InvalidQuery.truncate_expr(condition)}" end exists == (condition || false) end