HAML index of array element each loop
<p>So, i want to type the index of array element with each loop, i have tried </p>

<pre><code>- @characters = ['t','e','s','t'];

- @characters.each do |character, index|
    %div{:class =&gt; "#{index}"} #{character}
</code></pre>

<p>but nothing happened.</p>