On 2/10/08, Alex Shulgin <alex.shulgin / gmail.com> wrote: > On Feb 9, 4:25 pm, Pascal Ehlert <pascal.ehl... / odadata.eu> 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? ;) What, do you want me to do all of the OP's work for him for free? -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/