Class: Jsapi::Controller::ErrorResult
- Inherits:
-
Object
- Object
- Jsapi::Controller::ErrorResult
- Defined in:
- lib/jsapi/controller/error_result.rb
Overview
Used by api_operation!
to produce an error response.
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
The HTTP status code of the error response to be produced.
Instance Method Summary collapse
-
#initialize(exception, status:) ⇒ ErrorResult
constructor
Creates a new instance to produce an error response with the given HTTP status code.
Constructor Details
#initialize(exception, status:) ⇒ ErrorResult
Creates a new instance to produce an error response with the given HTTP status code.
15 16 17 18 |
# File 'lib/jsapi/controller/error_result.rb', line 15 def initialize(exception, status:) @exception = exception @status = status end |
Instance Attribute Details
#status ⇒ Object (readonly)
The HTTP status code of the error response to be produced.
9 10 11 |
# File 'lib/jsapi/controller/error_result.rb', line 9 def status @status end |