Module: Utter

Defined in:
lib/utter.rb,
lib/utter/version.rb,
lib/utter/utils/wrapper.rb

Defined Under Namespace

Modules: Utils

Constant Summary collapse

GLOBAL_EVENTS_TABLE =
EventsTable.new
VERSION =
"0.2.0"

Instance Method Summary collapse

Instance Method Details

#on(event, &block) ⇒ Object



42
43
44
# File 'lib/utter.rb', line 42

def on(event, &block)
  events[self.object_id][event.to_sym].push block
end

#utter(event, payload = nil) ⇒ Object



38
39
40
# File 'lib/utter.rb', line 38

def utter(event, payload=nil)
  events.process_event(self.object_id, event.to_sym, payload)
end