Class: Flipper::Api::ErrorResponse::Error
- Inherits:
-
Object
- Object
- Flipper::Api::ErrorResponse::Error
- Defined in:
- lib/flipper/api/error_response.rb
Instance Attribute Summary collapse
-
#http_status ⇒ Object
readonly
Returns the value of attribute http_status.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(code, message, http_status) ⇒ Error
constructor
A new instance of Error.
Constructor Details
#initialize(code, message, http_status) ⇒ Error
Returns a new instance of Error.
7 8 9 10 11 12 13 |
# File 'lib/flipper/api/error_response.rb', line 7 def initialize(code, , http_status) @code = code @message = @more_info = 'https://flippercloud.io/docs/api#error-code-reference' @http_status = http_status end |
Instance Attribute Details
#http_status ⇒ Object (readonly)
Returns the value of attribute http_status.
5 6 7 |
# File 'lib/flipper/api/error_response.rb', line 5 def http_status @http_status end |
Instance Method Details
#as_json ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/flipper/api/error_response.rb', line 15 def as_json { code: @code, message: @message, more_info: @more_info, } end |