So far we've looked at using Ruby to create HTML output, but we can
turn the problem inside out; we can actually embed Ruby in an HTML
document.
There are a number of packages that allow you to embed Ruby
statements in some other sort of a document, especially in an HTML
page. Generically, this is known as ``eRuby.'' Specifically, there
are several different implementations of eRuby, including
eruby
and
erb
. The remainder of this section will discuss
eruby
,
written by Shugo Maeda.
Embedding Ruby in HTML is a very powerful concept---it basically gives
us the equivalent of a tool such as ASP, JSP, or PHP, but with the
full power of Ruby.