class Apotomo::InvokeEventHandler
Attributes
state[RW]
widget_id[RW]
Public Class Methods
new(options={})
click to toggle source
# File lib/apotomo/invoke_event_handler.rb, line 7 def initialize(options={}) @widget_id = options[:widget_id] @state = options[:state] end
Public Instance Methods
process_event(event)
click to toggle source
# File lib/apotomo/invoke_event_handler.rb, line 12 def process_event(event) target = event.source.root.find_by_path(widget_id) ### DISCUSS: widget_id or widget_selector? target.invoke(state, event) end
to_s()
click to toggle source
# File lib/apotomo/invoke_event_handler.rb, line 18 def to_s; "InvokeEventHandler:#{widget_id}##{state}"; end