Sha256: ceff65a9912a2242e2f87f856d4c49ded9fc81898bbf5c4655c89780c7a936a8
Contents?: true
Size: 479 Bytes
Versions: 4
Compression:
Stored size: 479 Bytes
Contents
module Apotomo class InvokeEventHandler < EventHandler attr_accessor :widget_id, :state def initialize(opts={}) @widget_id = opts.delete(:widget_id) @state = opts.delete(:state) end def process_event(event) target = event.source.root.find_by_path(widget_id) ### DISCUSS: widget_id or widget_selector? target.invoke(state, event) end def to_s; "InvokeEventHandler:#{widget_id}##{state}"; end end end
Version data entries
4 entries across 4 versions & 1 rubygems