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?
fxn
···
–
s;$;Barcelona Perl Mongers;;$/=$||gaudi||3;map$,+=(split//)(-1)**$|++,
(split)[.11_09,1.714];$.=$!!~m~erce~;$"=y~catalunya~~,$;=y~rambles~~,$
=$/^$.;$:=$.+length,$@=$$$/$%$:,$%=$/$"-$*;print+chr($<0xA?$.
."$[$"^$.:?"$.$"
)for($($$%-$//$/),$%-$,$,$/,$$$,$
**$,$"$@+$$/,$$,$;,$*$**$,$$,$.,$$",$*$,$$$
$,$.,$"$,$"+$.,$$,$,-$.,$"$@+$$/,$;$/$,$",$.,++$@+by_fxn)