My implementation of Reactor pattern in Ruby