# module EventMachine::Hiredis::EventEmitter

### Public Instance Methods

emit(event, *args) click to toggle source

    # File lib/em-hiredis/event_emitter.rb, line 7
    def emit(event, *args)
      _listeners[event].each { |l| l.call(*args) }
    end

listeners(event) click to toggle source

    # File lib/em-hiredis/event_emitter.rb, line 19
    def listeners(event)
      _listeners[event]
    end

on(event, &listener) click to toggle source

    # File lib/em-hiredis/event_emitter.rb, line 3
    def on(event, &listener)
      _listeners[event] << listener
    end

remove_all_listeners(event) click to toggle source

    # File lib/em-hiredis/event_emitter.rb, line 15
    def remove_all_listeners(event)
      _listeners.delete(event)
    end

remove_listener(event, &listener) click to toggle source

    # File lib/em-hiredis/event_emitter.rb, line 11
    def remove_listener(event, &listener)
      _listeners[event].delete(listener)
    end