module Mongoid::Matcher::EqImplWithRegexp
This is an internal equality implementation that performs exact comparisons and regular expression matches.
@api private
Public Instance Methods
matches?(original_operator, value, condition)
click to toggle source
# File lib/mongoid/matcher/eq_impl_with_regexp.rb, line 9 def matches?(original_operator, value, condition) case condition when Regexp value =~ condition when ::BSON::Regexp::Raw value =~ condition.compile else value == condition end end