From: Richard Dale Date: 2003-09-13T01:57:30+09:00 Subject: Re: OO Challenge Weirich, James wrote: > I'll throw in my version. Logically it is structured very much like > Robert Klemme's except that I made lighter weight choices for some of the > abstractions. For example, I use simple procs for the tax groups and my > TaxPayer is Struct based. What is really interesting is that despite the > differences in representation, the last bits of our programs are identical > except for minor spelling differences. > > Here's the code. > def tax > tax_classes.collect { |tc| tc.call(self) }.max > end I like James' solution best because he has tax_classes 'collect'ing - which seems to model the real world well :). -- Richard