class Console::Event::Generic
A generic event which can be used to represent structured data.
def as_json(...)
Convert the event to a hash suitable for JSON serialization.
def as_json(...) to_hash end
def emit(*arguments, **options)
@parameter arguments [Array] The arguments to log.
Log the event using the given output interface.
def emit(*arguments, **options) Console.call(*arguments, event: self, **options) end
def to_hash
Convert the event to a hash suitable for JSON serialization.
def to_hash {} end
def to_json(...)
Serialize the event to JSON.
def to_json(...) JSON.generate(as_json, ...) end
def to_s
Convert the event to a string (JSON).
def to_s to_json end