Parent

Methods

Included Modules

Class Index [+]

Quicksearch

Rack::Chunked::Body

A body wrapper that emits chunked responses

Constants

TERM
TAIL

Public Class Methods

new(body) click to toggle source
    # File lib/rack/chunked.rb, line 17
17:       def initialize(body)
18:         @body = body
19:       end

Public Instance Methods

close() click to toggle source
    # File lib/rack/chunked.rb, line 33
33:       def close
34:         @body.close if @body.respond_to?(:close)
35:       end
each() click to toggle source
    # File lib/rack/chunked.rb, line 21
21:       def each
22:         term = TERM
23:         @body.each do |chunk|
24:           size = bytesize(chunk)
25:           next if size == 0
26: 
27:           chunk = chunk.dup.force_encoding(Encoding::BINARY) if chunk.respond_to?(:force_encoding)
28:           yield [size.to_s(16), term, chunk, term].join
29:         end
30:         yield TAIL
31:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.