class Rack::Brotli::Deflater::BrotliStream
Public Class Methods
new(body, options)
click to toggle source
# File lib/rack/brotli/deflater.rb 73 def initialize(body, options) 74 @body = body 75 @options = options 76 end
Public Instance Methods
close()
click to toggle source
# File lib/rack/brotli/deflater.rb 89 def close 90 @body.close if @body.respond_to?(:close) 91 end
each() { |deflate| ... }
click to toggle source
# File lib/rack/brotli/deflater.rb 78 def each(&block) 79 @writer = block 80 buffer = +'' 81 @body.each { |part| 82 buffer << part 83 } 84 yield ::Brotli.deflate(buffer, @options) 85 ensure 86 @writer = nil 87 end