Exception: RequestParamsValidation::InvalidParameterValueError
- Inherits:
-
RequestParamError
- Object
- StandardError
- GeneralError
- RequestParamError
- RequestParamsValidation::InvalidParameterValueError
- Defined in:
- lib/request_params_validation/exceptions/validator_errors.rb
Instance Attribute Summary collapse
-
#details ⇒ Object
readonly
Returns the value of attribute details.
-
#param_key ⇒ Object
readonly
Returns the value of attribute param_key.
-
#param_type ⇒ Object
readonly
Returns the value of attribute param_type.
-
#param_value ⇒ Object
readonly
Returns the value of attribute param_value.
Instance Method Summary collapse
-
#initialize(options) ⇒ InvalidParameterValueError
constructor
A new instance of InvalidParameterValueError.
- #message ⇒ Object
Constructor Details
#initialize(options) ⇒ InvalidParameterValueError
Returns a new instance of InvalidParameterValueError.
22 23 24 25 26 27 28 29 |
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 22 def initialize() @param_key = [:param_key] @param_value = [:param_value] @param_type = [:param_type] @details = [:details] super() end |
Instance Attribute Details
#details ⇒ Object (readonly)
Returns the value of attribute details.
20 21 22 |
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 20 def details @details end |
#param_key ⇒ Object (readonly)
Returns the value of attribute param_key.
20 21 22 |
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 20 def param_key @param_key end |
#param_type ⇒ Object (readonly)
Returns the value of attribute param_type.
20 21 22 |
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 20 def param_type @param_type end |
#param_value ⇒ Object (readonly)
Returns the value of attribute param_value.
20 21 22 |
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 20 def param_value @param_value end |
Instance Method Details
#message ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/request_params_validation/exceptions/validator_errors.rb', line 31 def = "The value for the parameter '#{param_key}' is invalid" if details.present? "#{}. #{details}" else end end |