lib/async/http/body/writable.rb in async-http-0.48.0 vs lib/async/http/body/writable.rb in async-http-0.48.1
- old
+ new
@@ -95,10 +95,22 @@
end
alias << write
def inspect
- "\#<#{self.class} #{@count} chunks written#{@finished ? ', finished' : ', waiting'}>"
+ "\#<#{self.class} #{@count} chunks written, #{status}>"
+ end
+
+ private
+
+ def status
+ if @finished
+ 'finished'
+ elsif @closed
+ 'closing'
+ else
+ 'waiting'
+ end
end
end
end
end
end