Class: ActiveSupport::Notifications::Fanout::Subscribers::EventObject
- Inherits:
-
Evented
- Object
- Evented
- ActiveSupport::Notifications::Fanout::Subscribers::EventObject
show all
- Defined in:
- lib/active_support/notifications/fanout.rb
Instance Attribute Summary
Attributes inherited from Evented
#pattern
Instance Method Summary
collapse
Methods inherited from Evented
#initialize, #publish, #subscribed_to?, #unsubscribe!
Instance Method Details
#finish(name, id, payload) ⇒ Object
265
266
267
268
269
270
271
|
# File 'lib/active_support/notifications/fanout.rb', line 265
def finish(name, id, payload)
stack = IsolatedExecutionState[:_event_stack]
event = stack.pop
event.payload = payload
event.finish!
@delegate.call event
end
|
#publish_event(event) ⇒ Object
273
274
275
|
# File 'lib/active_support/notifications/fanout.rb', line 273
def publish_event(event)
@delegate.call event
end
|
#start(name, id, payload) ⇒ Object
258
259
260
261
262
263
|
# File 'lib/active_support/notifications/fanout.rb', line 258
def start(name, id, payload)
stack = IsolatedExecutionState[:_event_stack] ||= []
event = build_event name, id, payload
event.start!
stack.push event
end
|