From: James Edward Gray II Date: 2005-02-07T23:11:46+09:00 Subject: Re: delayed string interpolation On Feb 7, 2005, at 4:00 AM, Martin DeMello wrote: > Robert Klemme wrote: >> >> One option is two levels of interpolation: >> >> generator = "my gen" >> application = "my test app" >> header = "\".....#{generator} .... #{application} .... >> \#{title}\"" >> ... >> title = "foo" >> real_header = eval header > > By this point I'd have switched to a proper template engine, just to > make sure the eval didn't bring in some hairy corner cases (am I being > overly paranoid?) I was going to suggest this earlier, in fact, but I > felt amrita was probably a bit too heavy for this case. This was my first thought when reading the original message as well. Might want to have a look at erb in the standard library. James Edward Gray II