Sha256: 876018e88cd8285be17189fce0cf3dbb42bbbc9633ca8453a7982bf7d81e3e5e
Contents?: true
Size: 852 Bytes
Versions: 14
Compression:
Stored size: 852 Bytes
Contents
# frozen_string_literal: true # encoding: utf-8 module Mongoid module Errors # Raised when invalid field-level operator is passed to the $elemMatch # embedded matcher. class InvalidElemMatchOperator < InvalidQuery # @api private VALID_OPERATORS = %w( and all eq exists gt gte in lt lte ne nin nor not or regex size ).freeze # Creates the exception. # # @param [ String ] operator The operator that was used. # # @api private def initialize(operator) @operator = operator super(compose_message("invalid_elem_match_operator", operator: operator, valid_operators: VALID_OPERATORS.map { |op| "'$#{op}'" }.join(', '), )) end # @return [ String ] The operator that was used. attr_reader :operator end end end
Version data entries
14 entries across 14 versions & 1 rubygems