test/template_language_test/templates/root.tpl in rgen-0.3.0 vs test/template_language_test/templates/root.tpl in rgen-0.4.0
- old
+ new
@@ -1,22 +1,31 @@
<% define 'Root' do %>
<% file 'testout.txt' do %>
Document: <%= title %>
-
+ <%nl%>
+ <%iinc%>
+ by <% expand 'content/author::Author', :foreach => authors, :separator => ' and ' %>
+ <%idec%>
+ <%nl%>
Index:<%iinc%>
<% for c in chapters %>
<% nr = (nr || 0); nr += 1 %>
<% expand 'index/chapter::Root', nr, this, :for => c %>
<% end %><%idec%>
-
- by <%= author %>
-
+ <%nl%>
----------------
-
- <% expand 'content/chapter::Root', :foreach => chapters %>
-
+ <%nl%>
+ Chapters in one line:
+ <% expand 'content/chapter::Root', :foreach => chapters, :separator => ", " %><%nl%>
+ <%nl%>
+ Chapters each in one line:
+ <% expand 'content/chapter::Root', :foreach => chapters, :separator => ",\n" %><%nl%>
+ <%nl%>
+ Here are some code examples:
+ <% expand 'code/array::ArrayDefinition', :for => sampleArray %>
<% end %>
<% end %>
-<% def MyNewMethod(arg1, arg2, arg3) %>
+<% define 'TextFromRoot' do %>
+ Text from Root
<% end %>