From: James Coglan Date: 2009-06-17T23:04:24+09:00 Subject: Re: Why is attr_accessor also mutator? --001636c5b47e93f0be046c8bc46d Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/6/17 bjorn borg > > Sorry for the "nitpicky question" but I'm new to Ruby and was wondering why > attr_accessor was used to implicitly define accessor AND a mutator when the > name attr_accessor itself has nothing alluding to mutation (i.e. > attr_accessor_mutator). It's just a shorthand for attr_reader and attr_writer. Yes it could use a better name I suppose, I guess brevity won out. If you only want a strict accessor, use attr_reader. -- James Coglan http://jcoglan.com --001636c5b47e93f0be046c8bc46d--