lib/mongoid/matchable/all.rb in mongoid-6.1.0 vs lib/mongoid/matchable/all.rb in mongoid-6.1.1

- old
+ new

@@ -6,15 +6,15 @@ class All < Default # Return true if the attribute and first value in the hash are equal. # # @example Do the values match? - # matcher.matches?({ :key => 10 }) + # matcher._matches?({ :key => 10 }) # # @param [ Hash ] value The values to check. # # @return [ true, false ] If the values match. - def matches?(value) + def _matches?(value) first = first(value) return false if first.is_a?(Array) && first.empty? attribute_array = Array.wrap(@attribute) first.all? do |e|