class Cura::Event::Middleware::Dispatch
Adds the event to the dispatch queue. Should be the very last middleware in the chain.
Public Instance Methods
call(options={})
click to toggle source
Add the event to the dispatch queue.
@param [#to_h] options @option options [Event::Base] :event
# File lib/cura/event/middleware/dispatch.rb, line 11 def call(options={}) # TODO: !!!! Refactor return nil if options[:event].nil? return nil if options[:event].target.nil? return nil if !options[:event].target.is_a?(Application) && options[:event].target.application.nil? # TODO: Check if orphaned, maybe log this? options[:dispatch_queue] << options[:event] end