Class: DoctorSwagger::ErrorResponse
- Inherits:
-
Object
- Object
- DoctorSwagger::ErrorResponse
- Defined in:
- lib/doctor_swagger/error_response.rb
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(http_status, error) ⇒ ErrorResponse
constructor
A new instance of ErrorResponse.
Constructor Details
#initialize(http_status, error) ⇒ ErrorResponse
Returns a new instance of ErrorResponse.
3 4 5 6 |
# File 'lib/doctor_swagger/error_response.rb', line 3 def initialize(http_status, error) @error = error @http_status = http_status end |
Instance Method Details
#as_json ⇒ Object
8 9 10 11 12 13 |
# File 'lib/doctor_swagger/error_response.rb', line 8 def as_json(*) { 'error' => @error, 'http_status' => @http_status } end |