Class: ResasKit::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/resas_kit/response.rb,
lib/resas_kit/response/middleware.rb,
lib/resas_kit/response/raise_error.rb

Defined Under Namespace

Classes: Middleware, RaiseError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ Response

Returns a new instance of Response.



7
8
9
10
11
# File 'lib/resas_kit/response.rb', line 7

def initialize(response)
  @headers = process(response.headers)
  @status  = process(response.status)
  @body    = process(response.body)
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



5
6
7
# File 'lib/resas_kit/response.rb', line 5

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



5
6
7
# File 'lib/resas_kit/response.rb', line 5

def headers
  @headers
end

#statusObject (readonly)

Returns the value of attribute status.



5
6
7
# File 'lib/resas_kit/response.rb', line 5

def status
  @status
end