Exception: Mongoid::Errors::InvalidExpressionOperator
- Inherits:
-
InvalidQuery
- Object
- StandardError
- MongoidError
- InvalidQuery
- Mongoid::Errors::InvalidExpressionOperator
- Defined in:
- lib/mongoid/errors/invalid_expression_operator.rb
Overview
Raised when invalid expression-level operator is passed to an embedded matcher.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary collapse
-
#operator ⇒ String
readonly
The operator that was used.
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(operator) ⇒ InvalidExpressionOperator
constructor
private
Creates the exception.
Methods inherited from InvalidQuery
Methods inherited from MongoidError
Constructor Details
#initialize(operator) ⇒ InvalidExpressionOperator
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Creates the exception.
13 14 15 16 17 18 |
# File 'lib/mongoid/errors/invalid_expression_operator.rb', line 13 def initialize(operator) @operator = operator super(('invalid_expression_operator', operator: operator, valid_operators: "'$and', '$nor', '$or'")) end |
Instance Attribute Details
#operator ⇒ String (readonly)
Returns The operator that was used.
21 22 23 |
# File 'lib/mongoid/errors/invalid_expression_operator.rb', line 21 def operator @operator end |