class Mongoid::Errors::InvalidElemMatchOperator

Raised when invalid field-level operator is passed to the $elemMatch embedded matcher.

Constants

VALID_OPERATORS

@api private

Attributes

operator[R]

@return [ String ] The operator that was used.

Public Class Methods

new(operator) click to toggle source

Creates the exception.

@param [ String ] operator The operator that was used.

@api private

Calls superclass method
# File lib/mongoid/errors/invalid_elem_match_operator.rb, line 21
def initialize(operator)
  @operator = operator
  super(compose_message("invalid_elem_match_operator",
    operator: operator,
    valid_operators: VALID_OPERATORS.map { |op| "'$#{op}'" }.join(', '),
  ))
end