4 5 6 7 8 9 10
# File 'lib/translate.rb', line 4 def self.translate(str, set) q = str.dup set.each do |k, v| q.gsub!(k, v) end q end