Sha256: e34196f5e754fea5547f805027ea46c5b0ec4c7104525725961e74c9bdb22579
Contents?: true
Size: 364 Bytes
Versions: 6
Compression:
Stored size: 364 Bytes
Contents
module UIControlWrap def when(events, options={}, &block) @callback ||= {} @callback[events] ||= [] unless options[:append] @callback[events] = [] removeTarget(nil, action: nil, forControlEvents: events) end @callback[events] << block addTarget(@callback[events].last, action:'call', forControlEvents: events) end end
Version data entries
6 entries across 6 versions & 1 rubygems