Module: Praxis::Notifications

Includes:
PluginConcern
Defined in:
lib/praxis/notifications.rb

Defined Under Namespace

Classes: Plugin

Class Method Summary collapse

Class Method Details

.instrument(name, payload = {}, &block) ⇒ Object



23
24
25
# File 'lib/praxis/notifications.rb', line 23

def self.instrument(name, payload = {}, &block)
  ActiveSupport::Notifications.instrument(name, **payload, &block)
end

.publish(name, *args) ⇒ Object



19
20
21
# File 'lib/praxis/notifications.rb', line 19

def self.publish(name, *args)
  ActiveSupport::Notifications.publish(name, *args)
end

.subscribe(*args, &block) ⇒ Object



27
28
29
# File 'lib/praxis/notifications.rb', line 27

def self.subscribe(*args, &block)
  ActiveSupport::Notifications.subscribe(*args, &block)
end

.subscribed(callback, *args, &block) ⇒ Object



31
32
33
# File 'lib/praxis/notifications.rb', line 31

def self.subscribed(callback, *args, &block)
  ActiveSupport::Notifications.subscribed(callback, *args, &block)
end

.unsubscribe(subscriber_or_name) ⇒ Object



35
36
37
# File 'lib/praxis/notifications.rb', line 35

def self.unsubscribe(subscriber_or_name)
  ActiveSupport::Notifications.unsubscribe(subscriber_or_name)
end