Ruby - Enumerable - collect

  • + 0 comments

    I found that it can be done using .tr ? any ideas?

    def rot13(secret_messages)
       secret_messages.map do |word|
         word.tr("a-z", "n-za-m")
       end
     end