Sha256: b398586f71bb68c366e4bc6092f7262e82c3c63eb08b369b80550c53aae0222a
Contents?: true
Size: 831 Bytes
Versions: 27
Compression:
Stored size: 831 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Mongoid class Criteria module Queryable # Adds macro behavior for adding symbol methods. module Macroable # Adds a method on Symbol for convenience in where queries for the # provided operators. # # @example Add a symbol key. # key :all, "$all # # @param [ Symbol ] name The name of the method. # @param [ Symbol ] strategy The merge strategy. # @param [ String ] operator The MongoDB operator. # @param [ String ] additional The additional MongoDB operator. # # @since 1.0.0 def key(name, strategy, operator, additional = nil, &block) ::Symbol.add_key(name, strategy, operator, additional, &block) end end end end end
Version data entries
27 entries across 27 versions & 2 rubygems