lib/async/http/body/wrapper.rb in async-http-0.31.1 vs lib/async/http/body/wrapper.rb in async-http-0.32.0

- old
+ new

@@ -27,31 +27,34 @@ class Wrapper < Readable def initialize(body) @body = body end + # The wrapped body. + attr :body + + # Buffer any remaining body. + def finish + @body.finish + end + + def close(error = nil) + @body.close(error) + + super + end + def empty? @body.empty? end def length @body.length end - # Buffer any remaining body. - def close - @body = @body.close - - return self - end - # Read the next available chunk. def read @body.read - end - - def stop(error) - @body.stop(error) end def inspect return @body.inspect end