You are viewing a single comment's thread. Return to all comments →
def rot13(secret_messages) secret_messages.map do |str| str.chars.map{|char| char.ord.between?(65,90) || char.ord.between?(97,122) ? cipher(char) : char }.join end end def cipher(char) 13.times {char.next!} return char.size > 1 ? char[1] : char end
Seems like cookies are disabled on this browser, please enable them to open this website
Ruby - Enumerable - collect
You are viewing a single comment's thread. Return to all comments →