Skip to content

Commit

Permalink
Compatibility with previous event argument.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed May 3, 2024
1 parent bf96c15 commit 132ae71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/console/event/generic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 132ae71

Please sign in to comment.