Method: ActionController::Streaming::Body#each

Defined in:
actionpack/lib/action_controller/metal/streaming.rb

#each {|TAIL| ... } ⇒ Object

For each element yielded by the response body, yield the element in chunked encoding.

Yields:



220
221
222
223
224
225
226
227
228
229
230
# File 'actionpack/lib/action_controller/metal/streaming.rb', line 220

def each(&block)
  term = TERM
  @body.each do |chunk|
    size = chunk.bytesize
    next if size == 0

    yield [size.to_s(16), term, chunk.b, term].join
  end
  yield TAIL
  yield term
end