Class: Cuprum::Collections::Errors::InvalidParameters
- Inherits:
-
Error
- Object
- Error
- Cuprum::Collections::Errors::InvalidParameters
- Defined in:
- lib/cuprum/collections/errors/invalid_parameters.rb
Overview
An error returned when a command is called with invalid parameters.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.collections.errors.invalid_parameters'
Instance Attribute Summary collapse
-
#command ⇒ Cuprum::Command
readonly
The called command.
-
#errors ⇒ Stannum::Errors
readonly
The errors returned by the parameters contract.
Instance Method Summary collapse
-
#initialize(command:, errors:) ⇒ InvalidParameters
constructor
A new instance of InvalidParameters.
Constructor Details
#initialize(command:, errors:) ⇒ InvalidParameters
Returns a new instance of InvalidParameters.
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/cuprum/collections/errors/invalid_parameters.rb', line 16 def initialize(command:, errors:) @command = command @errors = errors super( command: command, errors: errors, message: "invalid parameters for command #{command.class}" ) end |
Instance Attribute Details
#command ⇒ Cuprum::Command (readonly)
Returns the called command.
28 29 30 |
# File 'lib/cuprum/collections/errors/invalid_parameters.rb', line 28 def command @command end |
#errors ⇒ Stannum::Errors (readonly)
Returns the errors returned by the parameters contract.
31 32 33 |
# File 'lib/cuprum/collections/errors/invalid_parameters.rb', line 31 def errors @errors end |