From: swille Date: 2005-10-28T11:42:19+09:00 Subject: Re: "Reflecting" on my self.n00b On 10/27/05, dave.burt@gmail.com wrote: > You can save yourself some RSI by using attr_accessor. > > class ServiceProfile > attr_accessor :username, :url, :password, :owner, :certificate > def load_certificate() > @certificate.read > end > def call > yield self > end > def each_attribute(&block) > (methods - Object.instance_methods).each &block > end > end It seems that if I use attr_accessor, I can't use instance_variables(). Is that the case? If so, how could I peruse the instance variables to find the ones I need? Sorry for replying to my own thread so much :O)