Module: Reactor::Subscribable::ClassMethods
- Defined in:
- lib/reactor/models/concerns/subscribable.rb
Instance Method Summary collapse
Instance Method Details
#on_event(*args, &block) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/reactor/models/concerns/subscribable.rb', line 7 def on_event(*args, &block) = args. [:event_name], [:action] = args [:action] ||= block [:source] = self add_subscription() end |