From: Roger Alsing Date: 2008-05-17T14:48:36+09:00 Subject: Re: Not quite getting it. > class Test > attr_accessor :order > > def order=(order) > if order.kind_of?(Giraffe) > raise Exception.new("We package nearly everything, but > Giraffes????") > end > end > end > So is it common practise to do it like this? Eg. does active records have this kind of stuff in the generated code that comes out of "has_many" etc? Anyway, I think I do buy this. Preventing the wrong types form beeing used is pretty much the same as preventing the use of null in C#. It simply become an extra step in parameter validation. And thanks everyone for the replies :-) -- Posted via http://www.ruby-forum.com/.