Re: [jruby-dev] Forcing interpolation on a string that comes from a file

2007-05-31 Thread Eric Armstrong
Brilliant minds think alike. I had finally come to my senses and realized that I wanted to eval the thing as a string, so I coded something very similar: puts eval('"' + template + '"') At the moment, both idioms produce the same result: Errors on the quotation marks embedded in the HTML. So

Re: [jruby-dev] Forcing interpolation on a string that comes from a file

2007-05-31 Thread Charles Oliver Nutter
Eric Armstrong wrote: I'm reading a file into a string like this: template = File.open("test.dwt").readlines.join My hope was to interpolate the #{variables} in the file with the values defined in the program. The first attempt didn't work: puts template Nor did the second: puts eval

[jruby-dev] Forcing interpolation on a string that comes from a file

2007-05-31 Thread Eric Armstrong
I'm reading a file into a string like this: template = File.open("test.dwt").readlines.join My hope was to interpolate the #{variables} in the file with the values defined in the program. The first attempt didn't work: puts template Nor did the second: puts eval(template) So for me,