Class: WebPackage::InnerResponse
- Inherits:
-
Object
- Object
- WebPackage::InnerResponse
- 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
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#headers ⇒ Object
readonly
Returns the value of attribute headers.
-
#payload ⇒ Object
readonly
Returns the value of attribute payload.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
-
#initialize(status, headers, body) ⇒ InnerResponse
constructor
A new instance of InnerResponse.
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
#body ⇒ Object (readonly)
Returns the value of attribute body.
6 7 8 |
# File 'lib/web_package/inner_response.rb', line 6 def body @body end |
#headers ⇒ Object (readonly)
Returns the value of attribute headers.
6 7 8 |
# File 'lib/web_package/inner_response.rb', line 6 def headers @headers end |
#payload ⇒ Object (readonly)
Returns the value of attribute payload.
6 7 8 |
# File 'lib/web_package/inner_response.rb', line 6 def payload @payload end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
6 7 8 |
# File 'lib/web_package/inner_response.rb', line 6 def status @status end |