Library catalogue program in Ruby