Sha256: 51546a3def91f04167d560703a812493c70d4be5915794a1b04729a7b0f9e771
Contents?: true
Size: 732 Bytes
Versions: 14
Compression:
Stored size: 732 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Mongoid # This module contains all the behavior for Ruby implementations of MongoDB # selectors. # # @since 4.0.0 module Matchable extend ActiveSupport::Concern # Determines if this document has the attributes to match the supplied # MongoDB selector. Used for matching on embedded associations. # # @example Does the document match? # document._matches?(:title => { "$in" => [ "test" ] }) # # @param [ Hash ] selector The MongoDB selector. # # @return [ true, false ] True if matches, false if not. # # @since 1.0.0 def _matches?(selector) Matcher::Expression.matches?(self, selector) end end end
Version data entries
14 entries across 14 versions & 1 rubygems