Port of jQuery.Deferred to Ruby