Class: Console::Event::Generic

Inherits:
Object
  • Object
show all
Defined in:
lib/console/event/generic.rb

Direct Known Subclasses

Failure, Spawn

Instance Method Summary collapse

Instance Method Details

#as_jsonObject



9
10
11
# File 'lib/console/event/generic.rb', line 9

def as_json(...)
	to_hash
end

#emit(*arguments, **options) ⇒ Object



21
22
23
# File 'lib/console/event/generic.rb', line 21

def emit(*arguments, **options)
	Console.call(*arguments, event: self, **options)
end

#to_jsonObject



13
14
15
# File 'lib/console/event/generic.rb', line 13

def to_json(...)
	JSON.generate(as_json, ...)
end

#to_sObject



17
18
19
# File 'lib/console/event/generic.rb', line 17

def to_s
	to_json
end