instiki/vendor/plugins/erubis/examples/pi/example.eruby
2010-07-04 08:51:53 -05:00

15 lines
306 B
Text

<?rb
user = 'Erubis'
list = ['<aaa>', 'b&b', '"ccc"']
?>
<p>Hello @{user}@!</p>
<table>
<tbody>
<?rb list.each_with_index do |item, i| ?>
<tr bgcolor="@!{i % 2 == 0 ? '#FFCCCC' : '#CCCCFF'}@">
<td>@!{i + 1}@</td>
<td>@{item}@</td>
</tr>
<?rb end ?>
</tbody>
</table>