Module: TmfCommon::Publisher::ClassMethods
- Defined in:
- lib/tmf_common/publisher.rb
Instance Method Summary collapse
-
#broadcast_event(event_name, payload = {}) ⇒ Object
delegate to ASN.
Instance Method Details
#broadcast_event(event_name, payload = {}) ⇒ Object
delegate to ASN
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/tmf_common/publisher.rb', line 25 def broadcast_event(event_name, payload={}) event_name = [publisher_namespace, event_name].compact.join('.') if block_given? ActiveSupport::Notifications.instrument(event_name, payload) do yield end else ActiveSupport::Notifications.instrument(event_name, payload) end end |