From: "David A. Black" Date: 2008-05-30T20:23:02+09:00 Subject: Re: defining Private/Protected class attributes Hi -- On Fri, 30 May 2008, Carbon Monoxide wrote: > If I would like to define some private/protected class attributes, I > would have to list all their getters or setters under "private" like the > code below. Is there any way that makes it faster? > > > class HelloRuby > attr_accessor :a, :b > > private #a load of getters and setters > :a > :a= > :b > :b= > > public > def initialize > end > end class C private attr_accessor :a, :b public def initialize end end David -- Rails training from David A. Black and Ruby Power and Light: INTRO TO RAILS June 9-12 Berlin ADVANCING WITH RAILS June 16-19 Berlin See http://www.rubypal.com for details and updates!