# eRubyish templating - see http://en.wikipedia.org/wiki/ERuby # There are only three directives: # - Header; remainder of the source file is the template body # <% ... %> - rubyish statements # #{ ... } - inserted content # Any arbritrary code can appear before the template. Output to stdout # is appended to the template, both before and within the template body puts %q{}

Green Bottles...

<%n = 10 %> <%while n > 0 %>
#{n} green bottles standing on the wall, #{n} green bottles standing on the wall
<%# -- gratuitous use of puts ------------------------------ %> <%puts %q{and if one green bottle should accidently fall...} %>
<%n -= 1 %> there'd be #{if n then n else 'no' end} green bottles standing on the wall
<%end%>