Module: Dallal::Events::Publisher

Extended by:
ActiveSupport::Concern
Included in:
EventPublisher
Defined in:
lib/dallal/events/publisher.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#broadcast(info) ⇒ Object

def broadcast_event(name, payload = {})

if block_given?
  self.class.broadcast_event(name, payload) do
    yield
  end
else
  self.class.broadcast_event(name, payload)
end

end



22
23
24
# File 'lib/dallal/events/publisher.rb', line 22

def broadcast(info)
  self.class.broadcast(info)
end