Ruby implementation of ToyRobot problem