class Cura::Event::Middleware::Aimer::TargetOption

Sets the event's target to the component passed by an optional :target option.

Protected Instance Methods

set_target(options={}) click to toggle source
# File lib/cura/event/middleware/aimer/target_option.rb, line 23
def set_target(options={})
  options[:event].target = options[:target]
end
should_aim?(options={}) click to toggle source

@method call Call this middleware.

@param [#to_h] options @option options [Event::Dispatcher] :dispatcher @option options [Event::Base] :event @option options [Attributes::HasEvents] :target The optional target of the event.

# File lib/cura/event/middleware/aimer/target_option.rb, line 19
def should_aim?(options={})
  options.key?(:target)
end