Working version, need to clean up
Initial ruby file
Finished ruby implementation. Its beautiful but inefficient