From: Clifford Heath Date: 2007-03-18T15:50:06+09:00 Subject: Re: attr_accessor Corey Konrad wrote: > wow this attr_accessor thing is really great i can see this saving ALOT > of typing. If you want to check that assigned values are valid at the time of assignment (instead of later during validation), please consider using "typed_attr" from my "chattr" gem. gem install chattr class Foo typed_attr String :bar do |v| v.size <= 20 end end Now you can't assign a string that's nil or more than 20 characters without an exception being thrown. Clifford Heath.