Exception: RuleBasedValidator::InvalidParametersException
- Inherits:
-
StandardError
- Object
- StandardError
- RuleBasedValidator::InvalidParametersException
- Defined in:
- lib/rule_based_validator/exceptions.rb
Overview
Excepción para parámetros inválidos
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#code ⇒ Object
readonly
Returns the value of attribute code.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(errors) ⇒ InvalidParametersException
constructor
A new instance of InvalidParametersException.
Constructor Details
#initialize(errors) ⇒ InvalidParametersException
Returns a new instance of InvalidParametersException.
16 17 18 19 20 21 22 |
# File 'lib/rule_based_validator/exceptions.rb', line 16 def initialize(errors) super() @code = 18 @status = 400 @message = 'Parámetros inválidos' @body = { errors: errors } end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
14 15 16 |
# File 'lib/rule_based_validator/exceptions.rb', line 14 def body @body end |
#code ⇒ Object (readonly)
Returns the value of attribute code.
14 15 16 |
# File 'lib/rule_based_validator/exceptions.rb', line 14 def code @code end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
14 15 16 |
# File 'lib/rule_based_validator/exceptions.rb', line 14 def @message end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
14 15 16 |
# File 'lib/rule_based_validator/exceptions.rb', line 14 def status @status end |