Exception: ApiBlueprint::ResponseError
- Inherits:
-
StandardError
- Object
- StandardError
- ApiBlueprint::ResponseError
- Defined in:
- lib/api-blueprint.rb
Direct Known Subclasses
ClientError, NotFoundError, ServerError, UnauthenticatedError
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(env) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(env) ⇒ ResponseError
25 26 27 28 29 |
# File 'lib/api-blueprint.rb', line 25 def initialize(env) @status = env.status @headers = env.response_headers.symbolize_keys @body = env.body end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
24 25 26 |
# File 'lib/api-blueprint.rb', line 24 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
24 25 26 |
# File 'lib/api-blueprint.rb', line 24 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
24 25 26 |
# File 'lib/api-blueprint.rb', line 24 def status @status end |