Exception: ApiBlueprint::ResponseError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/api-blueprint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



31
32
33
# File 'lib/api-blueprint.rb', line 31

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



31
32
33
# File 'lib/api-blueprint.rb', line 31

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



31
32
33
# File 'lib/api-blueprint.rb', line 31

def status
  @status
end