Sha256: 424ff072c88bbac4f1ea2035f702ecfa8d249c644262b6ca061b9bcf3fe6219e
Contents?: true
Size: 834 Bytes
Versions: 29
Compression:
Stored size: 834 Bytes
Contents
# frozen_string_literal: true 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
29 entries across 29 versions & 1 rubygems