draft solution -- for review only -- do not merge!

@haf while this is not valid Ruby (which I do not master), this will hopefully allow you to get the ideas of the proposed solution. Your comments are appreciated. 
Why not use this?
![screen shot 2014-07-29 at 15 14 55](https://cloud.githubusercontent.com/assets/193115/3735292/59712c80-1722-11e4-8ece-cfd6d8335fa9.png)