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