Next: , Previous: , Up: Layouts and Rendering in GNU Artanis   [Contents]

14.3 Templating for Rubyists

Templating in GNU Artanis looks very similar to Rails.

The Rails code:

<% if( @fullscreen == 1 ) %>
<%= "<div class='full'><p>...</p></div>" %>
<% end %>

And the same function in GNU Artanis code:

<% (if (= fullscreen 1) %>
       <% "<div class='full'><p>...</p></div>" %>
       <% ) %>