lib/protocol/http/body/readable.rb in protocol-http-0.28.2 vs lib/protocol/http/body/readable.rb in protocol-http-0.29.0

- old
+ new

@@ -27,10 +27,18 @@ # @return [Boolean] def ready? false end + def rewindable? + false + end + + def rewind + false + end + def length nil end # Read the next available chunk. @@ -56,10 +64,10 @@ # Read all remaining chunks into a buffered body and close the underlying input. # @returns [Buffered] The buffered body. def finish # Internally, this invokes `self.each` which then invokes `self.close`. - Buffered.for(self) + Buffered.read(self) end # Enumerate all chunks until finished, then invoke `#close`. # # @yields {|chunk| ...} The block to call with each chunk of data.