diff --git a/parser.rb b/parser.rb index adaad3e..316e68d 100644 --- a/parser.rb +++ b/parser.rb @@ -1,3 +1,5 @@ def word_in_string?(word, string) - # implement with your code here + words = string.split(/[\s_\-.]/) + found = words.find { |w| w == word } + found ? :yes : :no end