Ruby port of EventEmitter from Node.js