From: Marc Heiler Date: 2008-05-01T00:25:48+09:00 Subject: Re: What is attr_accessor? > I even don't know what attr_accessor is. attr_accessor :colour in your class would allow you do to this: class Dog attr_accessor :colour end jimmy = Dog.new jimmy.colour = 'brown' puts jimmy.colour # "brown" jimmy.colour = 'black' puts jimmy.colour # "black" As far as i know the name attr_accessor is chosen because it unites both attr_reader (getter method) and attr_writer (setter method). (There also exists attr :foo but I never use attr ) -- Posted via http://www.ruby-forum.com/.