From: "E. Saynatkari" Date: 2006-02-27T05:42:24+09:00 Subject: Re: Using attr_writer? Joe wrote: > I'm confused about attr_writer. I thought it worked like this: > > class Foo > attr_writer :bar > > def do_stuff > puts @bar > end > end > > foo = Foo.new > foo.bar = 'baz' > foo.do_stuff # gives nil error > > Can somebody enlighten me? :) This is perfectly valid. If this is not your actual code, could you post that instead? It might be something else entirely. > Thanks, > Joe E -- Posted via http://www.ruby-forum.com/.