<%# locals: cabecalhos (Array), linhas (Array de Array), vazio (String), total (opcional) %> <% total_rodape = local_assigns[:total] %> <% if linhas.blank? %>

<%= vazio %>

<% else %> <% cabecalhos.each_with_index do |c, i| %> <% end %> <% linhas.each do |celulas| %> <% celulas.each_with_index do |cel, i| %> <% end %> <% end %> <% if total_rodape %> <% end %>
<%= c %>
<%= cel %>
Total <%= total_rodape %>
<% end %>