Initial ruby psuedocode.