Class: Cuprum::Collections::Errors::InvalidQuery
- Inherits:
-
Error
- Object
- Error
- Cuprum::Collections::Errors::InvalidQuery
- Defined in:
- lib/cuprum/collections/errors/invalid_query.rb
Overview
An error returned when a query is created with invalid filter parameters.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.collections.errors.invalid_query'
Instance Attribute Summary collapse
-
#errors ⇒ Stannum::Errors
readonly
The errors returned by the query builder.
-
#strategy ⇒ Symbol
readonly
The strategy used to construct the query.
Instance Method Summary collapse
-
#initialize(errors:, strategy:, message: nil) ⇒ InvalidQuery
constructor
A new instance of InvalidQuery.
Constructor Details
#initialize(errors:, strategy:, message: nil) ⇒ InvalidQuery
Returns a new instance of InvalidQuery.
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/cuprum/collections/errors/invalid_query.rb', line 15 def initialize(errors:, strategy:, message: nil) @errors = errors @strategy = strategy super( errors: errors, message: || , strategy: strategy ) end |
Instance Attribute Details
#errors ⇒ Stannum::Errors (readonly)
Returns the errors returned by the query builder.
27 28 29 |
# File 'lib/cuprum/collections/errors/invalid_query.rb', line 27 def errors @errors end |
#strategy ⇒ Symbol (readonly)
Returns the strategy used to construct the query.
30 31 32 |
# File 'lib/cuprum/collections/errors/invalid_query.rb', line 30 def strategy @strategy end |