Object
# File lib/rack/deflater.rb, line 113 def initialize(body) @body = body @closed = false end
# File lib/rack/deflater.rb, line 127 def close return if @closed @closed = true @body.close if @body.respond_to?(:close) end
# File lib/rack/deflater.rb, line 118 def each deflator = ::Zlib::Deflate.new(*DEFLATE_ARGS) @body.each { |part| yield deflator.deflate(part, Zlib::SYNC_FLUSH) } yield deflator.finish nil ensure deflator.close end
[Validate]
Generated with the Darkfish Rdoc Generator 2.