Class: Cuprum::Rails::Errors::InvalidParameters
- Inherits:
-
Error
- Object
- Error
- Cuprum::Rails::Errors::InvalidParameters
- Defined in:
- lib/cuprum/rails/errors/invalid_parameters.rb
Overview
Error class when a parameters hash does not match the expected contract.
Constant Summary collapse
- TYPE =
Short string used to identify the type of error.
'cuprum.rails.errors.invalid_parameters'
Instance Attribute Summary collapse
-
#errors ⇒ Stannum::Errors
readonly
The errors returned by the contract.
Instance Method Summary collapse
-
#initialize(errors:) ⇒ InvalidParameters
constructor
A new instance of InvalidParameters.
Constructor Details
#initialize(errors:) ⇒ InvalidParameters
Returns a new instance of InvalidParameters.
14 15 16 17 18 |
# File 'lib/cuprum/rails/errors/invalid_parameters.rb', line 14 def initialize(errors:) @errors = errors super(message: , errors: errors) end |
Instance Attribute Details
#errors ⇒ Stannum::Errors (readonly)
Returns the errors returned by the contract.
21 22 23 |
# File 'lib/cuprum/rails/errors/invalid_parameters.rb', line 21 def errors @errors end |