Class: ActionController::Streaming::Body
Do not use. This class is for internal use only.
Relationships & Source Files | |
Inherits: | Object |
Defined in: | actionpack/lib/action_controller/metal/streaming.rb |
Constant Summary
Class Method Summary
-
.new(body) ⇒ Body
constructor
Store the response body to be chunked.
Instance Method Summary
-
#close
Close the response body if the response body supports it.
-
#each {|TAIL| ... }
For each element yielded by the response body, yield the element in chunked encoding.
Constructor Details
.new(body) ⇒ Body
Store the response body to be chunked.
# File 'actionpack/lib/action_controller/metal/streaming.rb', line 214
def initialize(body) @body = body end
Instance Method Details
#close
Close the response body if the response body supports it.
# File 'actionpack/lib/action_controller/metal/streaming.rb', line 233
def close @body.close if @body.respond_to?(:close) end
#each {|TAIL| ... }
For each element yielded by the response body, yield the element in chunked encoding.