Template Engine in Ruby (similar to TT2)

  • Thread starter Ralf Robert Höppel
  • Start date
R

Ralf Robert Höppel

Hi all,

is there a template engine similar to Template Toolkit 2 (in Perl) available for Ruby? It should be feature-rich, stand-alone, not restricted to only generate HTML output.

I know there are solutions around (everybody writes his own, I suppose), but it is difficult to get an overview on what is available.

Thanks ---
Ralf.
 
P

Phrogz

is there a template engine similar to Template Toolkit 2 (in Perl) available for Ruby? It should be feature-rich, stand-alone, not restricted to only generate HTML output.

I'm not familiar with Perl or TT2. However, I will say that ERB (that
comes with Ruby) sounds like a good match. I use it at work for both
HTML and C++ code generation.

Because it was so common for me to want to use an XML file to drive an
ERB template, I wrote a little script that loads a specified XML file
into REXML, and makes that available to an ERB template.

It's simple, but it's Ruby...how much more simplicity and power do you
need? ;)

I've uploaded documentation and code for it at
http://phrogz.net/AnarkSamples/RubyGen/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top