Second iteration of ruby gigasecond exercise