Class: WebPackage::InnerResponse

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/web_package/inner_response.rb

Overview

This class is a convenience to represent an original response, later to be signed and packed.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, headers, body) ⇒ InnerResponse

Returns a new instance of InnerResponse.



8
9
10
11
12
13
# File 'lib/web_package/inner_response.rb', line 8

def initialize(status, headers, body)
  @status  = status
  @headers = prepare_headers(headers)
  @body    = body
  @payload = unrack_body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



6
7
8
# File 'lib/web_package/inner_response.rb', line 6

def body
  @body
end

#headersObject (readonly)

Returns the value of attribute headers.



6
7
8
# File 'lib/web_package/inner_response.rb', line 6

def headers
  @headers
end

#payloadObject (readonly)

Returns the value of attribute payload.



6
7
8
# File 'lib/web_package/inner_response.rb', line 6

def payload
  @payload
end

#statusObject (readonly)

Returns the value of attribute status.



6
7
8
# File 'lib/web_package/inner_response.rb', line 6

def status
  @status
end