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



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

#bodyObject (readonly)

Returns the value of attribute body.



24
25
26
# File 'lib/api-blueprint.rb', line 24

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



24
25
26
# File 'lib/api-blueprint.rb', line 24

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



24
25
26
# File 'lib/api-blueprint.rb', line 24

def status
  @status
end