Completed ruby exercise 10.