<% weeks.eachWithIndex{ week, i -> %>

Week No. $i

<% ['capacity','total','done'].each{ attr -> %> <% } // end of attribute %>
$attr ${week[attr]}
 
<% } // end of week %>