Good work on this. Here are my notes on your code:
- Nice use of
rotate!
This method takes care of two needs simultaneously, which is cool. - A quick note: There is no need for the
1
argument to be passed torotate!
, since it is passed by default. (See the docs on rotate! here). You can safely remove that argument. - Also heads up: if you were to run
convert_word_to_pig_latin
on a word that does not contain a vowel (like "why") your code would enter an infinite loop. (Your until loop would keep running forever.) How could you refactor your code to fix this bug? - Watch your indentation. Especially here, because it becomes difficult to read your code.
Good work!
-Phil