Parent

Methods

Rack::Deflater::DeflateStream

Constants

DEFLATE_ARGS

Public Class Methods

new(body) click to toggle source
# File lib/rack/deflater.rb, line 89
def initialize(body)
  @body = body
end

Public Instance Methods

each() click to toggle source
# File lib/rack/deflater.rb, line 93
def each
  deflater = ::Zlib::Deflate.new(*DEFLATE_ARGS)
  @body.each { |part| yield deflater.deflate(part, Zlib::SYNC_FLUSH) }
  yield deflater.finish
  nil
ensure
  @body.close if @body.respond_to?(:close)
  deflater.close
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.