lib/async/http/protocol/http1/connection.rb in async-http-0.64.1 vs lib/async/http/protocol/http1/connection.rb in async-http-0.64.2
- old
+ new
@@ -18,9 +18,21 @@
@ready = true
@version = version
end
+ def to_s
+ "\#<#{self.class} negotiated #{@version}, currently #{@ready ? 'ready' : 'in-use'}>"
+ end
+
+ def as_json(...)
+ to_s
+ end
+
+ def to_json(...)
+ as_json.to_json(...)
+ end
+
attr :version
def http1?
true
end