class AS::Notifications::Fanout::Subscribers::Timed
Public Class Methods
new(pattern, delegate)
click to toggle source
Calls superclass method
# File lib/as/notifications/fanout.rb, line 107 def initialize(pattern, delegate) @timestack = [] super end
Public Instance Methods
finish(name, id, payload)
click to toggle source
# File lib/as/notifications/fanout.rb, line 120 def finish(name, id, payload) started = @timestack.pop @delegate.call(name, started, Time.now, id, payload) end
publish(name, *args)
click to toggle source
# File lib/as/notifications/fanout.rb, line 112 def publish(name, *args) @delegate.call name, *args end
start(name, id, payload)
click to toggle source
# File lib/as/notifications/fanout.rb, line 116 def start(name, id, payload) @timestack.push Time.now end