From: Patrick Gundlach Date: 2005-10-26T05:07:01+09:00 Subject: Re: Comparing Classes with Case ? >> class AnonUser ; end >> class RegularUser < AnonUser ; end >> class Developer < RegularUser ; end >> class Guru < Developer ; end >> class Sysop < Guru ; end [...] > One thing that may be bad about this approach is that you can't have > multiple inheritance. You should at least use modules extending a User > class, so that you allow for a more interesting hirarchie. And I don't > see why User should not have a set of properties and methods like > > * developer? > * sysop? > > etc. (Created dynamically, naturally :-) > > That are my thoughts about the approach. Thanks for your thoughts. The above (my approach) fits so nicely with the single table inheritance in Rails without implementing a single line of code (except for the five lines above). With this, I get never above the multiple of 500 (or was it 5000?) lines of code to get a higher patrick.to_i value. But the #developer? (and alike) methods read better, right. Patrick