Completed 'substrings.rb' to find number of occurresnces of a word from dictionary found in string