A Ruby implementation of promises.