lib/reactor/event.rb in reactor-0.4.2 vs lib/reactor/event.rb in reactor-0.4.3
- old
+ new
@@ -50,9 +50,14 @@
class << self
def perform(name, data)
new.perform(name, data)
end
+ def process(name, data)
+ new.perform(name, data)
+ end
+ deprecate process: 'use Event#perform instead'
+
def publish(name, data = {})
message = new(data.merge(event: name))
if message.at.nil?
perform_async name, message.data