Parent

Methods

Class Index [+]

Quicksearch

Rack::Deflater::GzipStream

Public Class Methods

new(body, mtime) click to toggle source
    # File lib/rack/deflater.rb, line 54
54:       def initialize(body, mtime)
55:         @body = body
56:         @mtime = mtime
57:       end

Public Instance Methods

each(&block) click to toggle source
    # File lib/rack/deflater.rb, line 59
59:       def each(&block)
60:         @writer = block
61:         gzip  =::Zlib::GzipWriter.new(self)
62:         gzip.mtime = @mtime
63:         @body.each { |part|
64:           gzip.write(part)
65:           gzip.flush
66:         }
67:         @body.close if @body.respond_to?(:close)
68:         gzip.close
69:         @writer = nil
70:       end
write(data) click to toggle source
    # File lib/rack/deflater.rb, line 72
72:       def write(data)
73:         @writer.call(data)
74:       end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.