-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sockets - Carla #31
base: master
Are you sure you want to change the base?
Sockets - Carla #31
Conversation
Portmanteau GeneratorWhat We're Looking For
Great job overall! I've left a few comments inline below where things could be cleaned up, but in general I am quite happy with this project. Keep up the hard work! |
word_B = gets.chomp | ||
until word_B.size >= 2 | ||
puts "Your word should have at least 2 letters." | ||
word_B = gets.chomp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your code to get the second word is almost exactly the same as the code to get the first word. Could you DRY this up using another method?
# Check if character is a vowel | ||
def is_vowel? (letter) | ||
if VOWELS.include? (letter) | ||
true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good use of a constant and of .include?
here.
word_A = gets.chomp | ||
until word_A.size >= 2 | ||
puts "Your word should have at least 2 letters." | ||
word_A = gets.chomp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In Ruby, we typically name variables using all lowercases letters, so this would be word_a
.
Portmanteau Generator
Congratulations! You're submitting your assignment.
Comprehension Questions
is_vowel?
method affect your project?