Mike Onofrietto wrote in post #980715:
> However I've had very good results with attr_accessor.
> Please help.

You only defined reader methods. You also need:

  def name=(name)
    @name=name
  end
  def artist=(artist)
    @artist=artist
  end
  ... etc

'attr_accessor' gives you both reader and writer methods. 'attr_reader' 
gives you just the reader ones (as in your code), and 'attr_writer' 
gives just the writer ones.

In future, it would be very helpful if you could post the exact error 
message you see. In your case it was probably something like 
NoMethodError - unknown method 'artist=', which would have immediately 
pinpointed the error.

Regards,

Brian.

-- 
Posted via http://www.ruby-forum.com/.