Class: Cura::Event::Middleware::Dispatch
- Defined in:
- lib/cura/event/middleware/dispatch.rb
Overview
Adds the event to the dispatch queue. Should be the very last middleware in the chain.
Instance Method Summary collapse
-
#call(options = {}) ⇒ Object
Add the event to the dispatch queue.
Instance Method Details
#call(options = {}) ⇒ Object
Add the event to the dispatch queue.
11 12 13 14 15 16 17 18 |
# File 'lib/cura/event/middleware/dispatch.rb', line 11 def call(={}) # TODO: !!!! Refactor return nil if [:event].nil? return nil if [:event].target.nil? return nil if ![:event].target.is_a?(Application) && [:event].target.application.nil? # TODO: Check if orphaned, maybe log this? [:dispatch_queue] << [:event] end |