From: Larry White Date: 2005-12-10T11:58:17+09:00 Subject: Re: Customizing erb's recognized tags i want to do a series of replacements on a file in two passes - one at 'compile time', one at runtime. For a simple example, if i'm creating 2 copies of a dynamic web page - one for each of two tables - i would replace references to the table at 'compile time' and display the particular values of a record from the table at runtime.It might look like this <% for column in #{table_name}.display_columns %> <%= column.name %> <% end %> So i want to replace #{table_name} in the first pass and the rest of the stuff in the second pass. Since there could be a large number of replacements at either time, I thought a solution using erb with different tag sets might be reasonably maintainable. thanks for your help. On 12/9/05, James Edward Gray II wrote: > On Dec 9, 2005, at 8:33 PM, Larry White wrote: > > > I need to read in a template file and apply replacements in two steps > > - so i can't use the same tags for each pass. > > > > I don't think string interpolation works on strings read from files > > which are single quoted by default. If there's a way around that it > > might be ok. > > I just showed how to use delayed String interpolation on any String. > My example was single quoted. > > Perhaps I don't understand the question. Can you post a trivial > example of what you want to work? > > James Edward Gray II > >