Class: Liberty::Adapters::Response
- Inherits:
-
Object
- Object
- Liberty::Adapters::Response
- Defined in:
- lib/liberty/adapters/response.rb
Constant Summary collapse
- CONTENT_TYPE =
"Content-Type"- CONTENT_LENGTH =
"Content-Length"- MIME_TYPE_JSON =
"application/json"- MIME_TYPE_HTML =
"text/html"- MIME_TYPE_TEXT =
"text/plain"- EMPTY_CONTENT =
""
Instance Attribute Summary collapse
-
#endpoint ⇒ Object
readonly
Returns the value of attribute endpoint.
Instance Method Summary collapse
-
#initialize(endpoint) ⇒ Response
constructor
A new instance of Response.
- #to_rack_response ⇒ Object
Constructor Details
#initialize(endpoint) ⇒ Response
Returns a new instance of Response.
15 16 17 |
# File 'lib/liberty/adapters/response.rb', line 15 def initialize(endpoint) @endpoint = endpoint end |
Instance Attribute Details
#endpoint ⇒ Object (readonly)
Returns the value of attribute endpoint.
13 14 15 |
# File 'lib/liberty/adapters/response.rb', line 13 def endpoint @endpoint end |
Instance Method Details
#to_rack_response ⇒ Object
19 20 21 |
# File 'lib/liberty/adapters/response.rb', line 19 def to_rack_response [status, headers, [content]] end |