Push pull

This is the first ruby code I've ever written. Frankly, I cargo-culted it a bit. Hopefully there are no howlers.