You are viewing a single comment's thread. Return to all comments →
def strike(string) "<strike>#{string}</strike>" end def mask_article(string, words_arr) words_arr.each do |word| string.gsub!(word, strike(word)) end string end
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby - Strings - Methods II
You are viewing a single comment's thread. Return to all comments →