From 132ae71f9551af2a4596f6ceefd193c3a4990426 Mon Sep 17 00:00:00 2001 From: Samuel Williams Date: Fri, 3 May 2024 13:20:09 +1200 Subject: [PATCH] Compatibility with previous event argument. --- lib/console/event/generic.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/console/event/generic.rb b/lib/console/event/generic.rb index 594a061..0dccfc8 100644 --- a/lib/console/event/generic.rb +++ b/lib/console/event/generic.rb @@ -14,6 +14,10 @@ def to_json(...) JSON.generate(as_json, ...) end + def to_s + to_json + end + def emit(*arguments, **options) Console.call(*arguments, event: self, **options) end