Class: Rack::Chunked::Body
- Inherits:
-
Object
- Object
- Rack::Chunked::Body
- Includes:
- Utils
- Defined in:
- lib/rack/chunked.rb
Overview
A body wrapper that emits chunked responses
Constant Summary collapse
Constants included from Utils
Utils::DEFAULT_SEP, Utils::ESCAPE_HTML, Utils::ESCAPE_HTML_PATTERN, Utils::HTTP_STATUS_CODES, Utils::Multipart, Utils::STATUS_WITH_NO_ENTITY_BODY, Utils::SYMBOL_TO_STATUS_CODE
Instance Method Summary collapse
- #close ⇒ Object
- #each {|TAIL| ... } ⇒ Object
-
#initialize(body) ⇒ Body
constructor
A new instance of Body.
Methods included from Utils
build_nested_query, build_query, byte_ranges, bytesize, delete_cookie_header!, escape, escape_html, escape_path, normalize_params, parse_nested_query, parse_query, rfc2822, select_best_encoding, set_cookie_header!, status_code, unescape
Constructor Details
#initialize(body) ⇒ Body
Returns a new instance of Body.
17 18 19 |
# File 'lib/rack/chunked.rb', line 17 def initialize(body) @body = body end |
Instance Method Details
#close ⇒ Object
31 32 33 |
# File 'lib/rack/chunked.rb', line 31 def close @body.close if @body.respond_to?(:close) end |