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
Returns a new instance of ResponseError.
32 33 34 35 36 |
# File 'lib/api-blueprint.rb', line 32 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.
31 32 33 |
# File 'lib/api-blueprint.rb', line 31 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
31 32 33 |
# File 'lib/api-blueprint.rb', line 31 def headers @headers end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
31 32 33 |
# File 'lib/api-blueprint.rb', line 31 def status @status end |