Class: ActiveSupport::Notifications::Fanout::Subscribers::Timed
- Inherits:
-
Evented
- Object
- Evented
- ActiveSupport::Notifications::Fanout::Subscribers::Timed
show all
- Defined in:
- lib/vendor/active_support/notifications/fanout.rb
Instance Method Summary
collapse
Methods inherited from Evented
#initialize, #matches?, #subscribed_to?
Instance Method Details
#finish(name, id, payload) ⇒ Object
124
125
126
127
128
|
# File 'lib/vendor/active_support/notifications/fanout.rb', line 124
def finish(name, id, payload)
timestack = Thread.current[:_timestack]
started = timestack.pop
@delegate.call(name, started, Time.now, id, payload)
end
|
#publish(name, *args) ⇒ Object
115
116
117
|
# File 'lib/vendor/active_support/notifications/fanout.rb', line 115
def publish(name, *args)
@delegate.call name, *args
end
|
#start(name, id, payload) ⇒ Object
119
120
121
122
|
# File 'lib/vendor/active_support/notifications/fanout.rb', line 119
def start(name, id, payload)
timestack = Thread.current[:_timestack] ||= []
timestack.push Time.now
end
|