module Dallal::Events::Publisher::ClassMethods
Public Instance Methods
broadcast(info)
click to toggle source
Broadcast to dallals
# File lib/dallal/events/publisher.rb, line 28 def broadcast(info) ActiveSupport::Notifications.instrument(self.pub_sub_namespace, info) end
broadcast_event(name, payload = {}) { || ... }
click to toggle source
# File lib/dallal/events/publisher.rb, line 32 def broadcast_event(name, payload = {}) if block_given? ActiveSupport::Notifications.instrument(name, payload) do yield end else ActiveSupport::Notifications.instrument(name, payload) end end