Sha256: ba70991b8866ba7efa030872588333662f962b1fc1d5c54bd6839ce17ddcf32c
Contents?: true
Size: 575 Bytes
Versions: 34
Compression:
Stored size: 575 Bytes
Contents
module Messaging module Instrumentation NAMESPACE = 'messaging' def instrument(event, extra = {}) ActiveSupport::Notifications.instrument("#{NAMESPACE}.#{event}", extra) do |extra| yield(extra) if block_given? end end def self.subscribe(event) ActiveSupport::Notifications.subscribe("#{NAMESPACE}.#{event}") do |*args| yield ActiveSupport::Notifications::Event.new(*args) if block_given? end end def self.unsubscribe(subscriber) ActiveSupport::Notifications.unsubscribe(subscriber) end end end
Version data entries
34 entries across 34 versions & 1 rubygems