Sha256: cb2845241ebf33f6df4f75e0238c35c6a91258345d2acbd6068591da7651fab6
Contents?: true
Size: 521 Bytes
Versions: 4
Compression:
Stored size: 521 Bytes
Contents
require 'apotomo/event_handler' module Apotomo class InvokeEventHandler < EventHandler attr_accessor :widget_id, :state def initialize(options={}) @widget_id = options.delete(:widget_id) @state = options.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