Library exercise / part 1, in Ruby