Sha256: 6bfa781b899308e715d1a96c77daf67ca9d1ad6424efc30693b5e15718b0851d
Contents?: true
Size: 480 Bytes
Versions: 12
Compression:
Stored size: 480 Bytes
Contents
module Apotomo # EventHandlers are "callbacks", not knowing why they exist, but what to do. class EventHandler def process_event(event) # do something, and return content. nil end def ==(other) self.to_s == other.to_s end # Invoked by Onfire. def call(event) event.source.root.page_updates << process_event(event) end end end require 'apotomo/invoke_event_handler' require 'apotomo/proc_event_handler'
Version data entries
12 entries across 12 versions & 1 rubygems