Skip to content

Instantly share code, notes, and snippets.

@liaden
Created June 23, 2014 19:57
Show Gist options
  • Save liaden/80f4e73505872fc89db6 to your computer and use it in GitHub Desktop.
Save liaden/80f4e73505872fc89db6 to your computer and use it in GitHub Desktop.
letters = "ABCDEFGHIJKLMNOPRSTUVWXYZ"
map = {}
letters.each_char.each_with_index do |c, i|
map[c] = letters[(i+13)%26]
end
map.keys.each do |k|
map[k.downcase] = map[k].downcase
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment