Forum: Ruby Template Engine in Ruby (similar to TT2)

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ralf Robert Höppel (Guest)
on 2007-02-13 18:04
(Received via mailing list)
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.
Jason R. (Guest)
on 2007-02-13 18:16
(Received via mailing list)
ERB is a general templating language.

http://www.ruby-doc.org/stdlib/libdoc/erb/rdoc/

Jason
Jeff B. (Guest)
on 2007-02-13 19:05
(Received via mailing list)
On 2/13/07, Ralf Robert Höppel <removed_email_address@domain.invalid> wrote:
>
Ralf,

There is a nice assortment of template engines in Ruby. A good overview
of
the more common ones is on this wiki page. Many of these can be used for
both html and non-html output and they mention that in their features.

http://www.rubygarden.org/ruby?HtmlTemplates

however the wiki appears to be not responding right now so google cache
has
a recent copy [here][1] (or search google for ruby html templates and
you'll
find it)

This site lists a quick snippet of their syntax and the major features
along
with links to the sites.

Jeff

[1]:
http://72.14.203.104/search?q=cache:4Utrub7qvyIJ:w...
Gavin K. (Guest)
on 2007-02-13 19:50
(Received via mailing list)
On Feb 13, 9:03 am, Ralf Robert Höppel <removed_email_address@domain.invalid> 
wrote:
> 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/
This topic is locked and can not be replied to.