Class: ActiveSupport::Notifications::Fanout::Subscribers::EventObject
- Inherits:
-
Evented
- Object
- Evented
- ActiveSupport::Notifications::Fanout::Subscribers::EventObject
show all
- Defined in:
- activesupport/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
270
271
272
273
274
275
276
|
# File 'activesupport/lib/active_support/notifications/fanout.rb', line 270
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
278
279
280
|
# File 'activesupport/lib/active_support/notifications/fanout.rb', line 278
def publish_event(event)
@delegate.call event
end
|
#start(name, id, payload) ⇒ Object
263
264
265
266
267
268
|
# File 'activesupport/lib/active_support/notifications/fanout.rb', line 263
def start(name, id, payload)
stack = IsolatedExecutionState[:_event_stack] ||= []
event = build_event name, id, payload
event.start!
stack.push event
end
|