A simple Ruby exercise to computer baseball statistics