Skip to content

Instantly share code, notes, and snippets.

@daiando
Last active December 7, 2015 01:13
Show Gist options
  • Save daiando/bb886c901cf73e8253ad to your computer and use it in GitHub Desktop.
Save daiando/bb886c901cf73e8253ad to your computer and use it in GitHub Desktop.
write a method which takes an array of strings (containing secret enemy message bits!) and decodes its elements using ROT13 cipher system; returning an array containing the final messages.
def rot13(secret_messages)
secret_messages.map { |x|
x.tr!("A-Za-z", "N-ZA-Mn-za-m")
}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment