Module: Reactor::Publishable
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/reactor/models/concerns/publishable.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#publish(name, data = {}) ⇒ Object
9 10 11 |
# File 'lib/reactor/models/concerns/publishable.rb', line 9 def publish(name, data = {}) Reactor::Event.publish(name, data.merge(actor: self) ) end |
#reschedule_events ⇒ Object
13 14 15 16 17 |
# File 'lib/reactor/models/concerns/publishable.rb', line 13 def reschedule_events self.class.events.each do |name, data| reschedule(name, data) end end |