Completed ruby exercise 5.