Using pure Ruby in templates for conditionals and iterations