### Home Classes Methods

### In Files

- lib/em-hiredis/event_emitter.rb

### Methods

- #emit
- #listeners
- #on
- #remove_all_listeners
- #remove_listener

### Class/Module Index

Quicksearch

- EventMachine
- EventMachine::Hiredis
- EventMachine::Hiredis::BaseClient
- EventMachine::Hiredis::Client
- EventMachine::Hiredis::Connection
- EventMachine::Hiredis::Error
- EventMachine::Hiredis::EventEmitter
- EventMachine::Hiredis::PubsubClient
- EventMachine::Hiredis::RedisError
- EM
- EM::Hiredis
- EM::Hiredis::Lock
- EM::Hiredis::PersistentLock

No matching classes.

# 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

[Validate]

Generated with the Darkfish Rdoc Generator 2.