diff --git a/.word_in_string_spec.rb.swp b/.word_in_string_spec.rb.swp new file mode 100644 index 0000000..161111d Binary files /dev/null and b/.word_in_string_spec.rb.swp differ diff --git a/parser.rb b/parser.rb index adaad3e..51b9be8 100644 --- a/parser.rb +++ b/parser.rb @@ -1,3 +1,8 @@ def word_in_string?(word, string) - # implement with your code here + split_string = string.split(%r{\s|_|-}) + if split_string.include?(word) + :yes + else + :no + end end