class Rodent::Base

Attributes

error_handler[RW]
instance[R]
listeners[R]

Public Class Methods

bind() click to toggle source
# File lib/rodent/base.rb, line 22
def bind
  listeners.each do |listener|
    listener.bind(error_handler)
  end
end
listen(type, &block) click to toggle source
# File lib/rodent/base.rb, line 18
def listen(type, &block)
  listeners << Rodent::Listener.new(type, &block)
end
route(type) click to toggle source
# File lib/rodent/base.rb, line 11
def route(type)
  @listeners.each do |listener|
    return listener if type == listener.type
  end
  nil
end