From: me Date: 2008-03-16T05:04:52+09:00 Subject: Re: How to iterate through instance attribute names (attr_ac On Mar 15, 2:38 pm, Mark Bush wrote: > If you just want to run the validates for the variables specified in the > "attr_accessor" methods and not for other instance variables, then you > could do something like this: > > class Event >   @@attributes = [:a, :b, :c, :d] >   @@attributes.each {|attr| attr_accessor attr} > >   def validate >     @@attributes.each {|attr| send "validate_#{attr.to_s}" } >   end > This is also very helpful. Thanks for the swift responses!