From: "John W. Long" Date: 2003-07-08T12:22:15+09:00 Subject: Re: calling eruby from code? > I've found documentation for running eruby(1) from the command line and > for configuring Apache to handle eruby templates. Do you know how to > process templates from within Ruby code? > > Just to be explicit, the idea would be for example to instantiate an > eruby template engine as a Ruby object, pass to it an eruby template as > a string, pass to it in addition a handful of Ruby objects used in the > template, and have the engine process all the stuff and, say, return > the result as a string. > > Is that possible? If not, would you recommend some other framework? Yes it is possible. Take a look at the "apache/eruby-run.rb" file. This ruby handler for rhtml files demonstrates how to do exactly what you want. ___________________ John Long www.wiseheartdesign.com