Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Portmanteau Generator
Congratulations! You're submitting your assignment.
Comprehension Questions
is_vowel?
method affect your project?is_vowel?
method in my loops made it much easier to evaluate whether any given letter was a value. Since all that code used for checking was contained in that one method, it meant myrun_generator
method wasn't as cluttered as it would have been otherwise.chomp
method to remove any characters I didn't want. However, Shubha pointed out thatchomp
eliminates ALL instances of that letter in the word (which would lead to some undesirable behavior). When she suggested making index numbers a pivotal part of my solution, I used 1) each_char, 2) an iterator and 3) a conditional statement to capture the last vowel's position in the string. Then, I used theslice
method to remove unwanted characters based on the vowel's position.