ERUBIS(1) | User Commands | ERUBIS(1) |
erubis - eRuby style template engine for multiple languages
erubis [..options..] [file ...]
Embedded templating engine for multiple languages. Erubis will take a template file as input and output code to convey that data in the language specified. The following output languages are supported:
--bufclass="StringBuffer" : output buffer class (ex. 'StringBuilder')
Run 'erubis -l php example.ephp' to convert the embedded document to php code.
example.ephp:
<?xml version="1.0"?>
<html>
<body>
<p>Hello <%= $user %>!</p>
<table>
<tbody>
<% $i = 0; %>
<% foreach ($list as $item) { %>
<% $i++; %>
<tr bgcolor="<%= $i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'
%>">
<td><%= $i %></td>
<td><%== $item %></td>
</tr>
<% } %>
</tbody>
</table>
</body>
</html>
http://rubyforge.org/projects/erubis/
January 2009 | erubis 2.6.2 |