title: Ruby iterating through string
body: <p>I'm trying to iterate through the vowels <code>"aeiou"</code> and move every letter forward, returning the string <code>"eioua"</code>. This is my code:</p>
  
  <pre><code>def vowel(letter)
    vowels = "aeiou"
    string = ""
    index = 0
    while index &lt; letter.length
      current_id = vowels.index(letter)
      next_vowel = vowels[current_id + 1]
      string += next_vowel
      index += 1
    end
    string
  end
  </code></pre>
  
  <p>When I pass <code>"aeiou"</code> as a parameter to my method, it just takes <code>"a"</code>, and prints <code>"eeeee"</code>.</p>
  
  <pre><code>vowel("aeiou") # =&gt; "eeeee"
  </code></pre>