From: Nobuyoshi Nakada Date: 2007-05-17T16:15:05+09:00 Subject: Re: Coopting String interpolation Hi, At Thu, 17 May 2007 13:20:14 +0900, aurelianito wrote in [ruby-talk:251879]: > class String > # do some magic here > end > > name="Aure" > greeting="hi, #{name}" > > and now greeting evaluates to "hi, AURE". Is there a method in String > to override in order to take control of the String interpolation? If the value isn't a String, to_s is called for it to get a String. Otherwise, the content is interpolated directly. There is not a hook you want. -- Nobu Nakada