class Wordini def self.obfuscate(word_string, words_to_remove) word_string.split.map{ |word| if words_to_remove.include? word word = "*" * word.split('').count else word = word end }.join(' ') end def self.report(word_string, search_terms) word_set = {} search_terms.each { |word| count = word_string.split.count(word) word_set[word] = count } word_set end end