instiki/vendor/plugins/erubis-2.6.5/examples/basic/example.eruby

16 lines
311 B
Plaintext
Raw Normal View History

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