From: Alex Shulgin Date: 2008-02-10T18:29:57+09:00 Subject: Re: Inheriting from / Delegating to Integer - Currency class implementation On Feb 9, 4:25 pm, Pascal Ehlert wrote: > On 2/9/2008 Rick DeNatale wrote: > > >   def coerce(other) > >     [self, other.to_currency] > >   end > > Whoa, that looks really interesting. > Thanks a lot, Rick! > > However, is there another way to implement the Currency class using > DelegateClass? > It still feels wrong to me to write +, -, * and / on my own, although > they are exactly the same as in the Integer class. Huh?.. And what is the result for $5 divided by $1? ;) -- Cheers, Alex