Exception: RequestParamsValidation::DefinitionArgumentError
- Inherits:
-
DefinitionsError
- Object
- StandardError
- GeneralError
- DefinitionsError
- RequestParamsValidation::DefinitionArgumentError
- Defined in:
- lib/request_params_validation/exceptions/definitions_errors.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#resource ⇒ Object
Returns the value of attribute resource.
Instance Method Summary collapse
-
#initialize(error_msg, options = {}) ⇒ DefinitionArgumentError
constructor
A new instance of DefinitionArgumentError.
- #message ⇒ Object
Constructor Details
#initialize(error_msg, options = {}) ⇒ DefinitionArgumentError
Returns a new instance of DefinitionArgumentError.
16 17 18 19 20 21 |
# File 'lib/request_params_validation/exceptions/definitions_errors.rb', line 16 def initialize(error_msg, = {}) @error_msg = error_msg @resource = [:resource] super() end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
14 15 16 |
# File 'lib/request_params_validation/exceptions/definitions_errors.rb', line 14 def action @action end |
#resource ⇒ Object
Returns the value of attribute resource.
14 15 16 |
# File 'lib/request_params_validation/exceptions/definitions_errors.rb', line 14 def resource @resource end |
Instance Method Details
#message ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/request_params_validation/exceptions/definitions_errors.rb', line 23 def if resource "Argument error for resource '#{resource}'. #{@error_msg}" else @error_msg end end |