Class: Webmachine::Adapters::Rack::RackResponse
- Inherits:
-
Object
- Object
- Webmachine::Adapters::Rack::RackResponse
- Defined in:
- lib/webmachine/adapters/rack.rb
Constant Summary collapse
- ONE_FIVE =
'1.5'.freeze
Instance Method Summary collapse
- #finish ⇒ Object
-
#initialize(body, status, headers) ⇒ RackResponse
constructor
A new instance of RackResponse.
Constructor Details
#initialize(body, status, headers) ⇒ RackResponse
Returns a new instance of RackResponse.
121 122 123 124 125 |
# File 'lib/webmachine/adapters/rack.rb', line 121 def initialize(body, status, headers) @body = body @status = status @headers = headers end |
Instance Method Details
#finish ⇒ Object
127 128 129 130 131 |
# File 'lib/webmachine/adapters/rack.rb', line 127 def finish @headers[CONTENT_TYPE] ||= TEXT_HTML if rack_release_enforcing_content_type @headers.delete(CONTENT_TYPE) if response_without_body [@status, @headers, @body] end |