Skip to content

Instantly share code, notes, and snippets.

@d0ppler
Created April 13, 2015 17:20
Show Gist options
  • Save d0ppler/685308371fbfe7692249 to your computer and use it in GitHub Desktop.
Save d0ppler/685308371fbfe7692249 to your computer and use it in GitHub Desktop.
chiper
class ChiperOutput
chiper = {
/a/ => ['1q24t', 'akO17']
/b/ => ['5T15q', 'x1m45']
/c/ => ['1p97x', '9zP23']
/d/ => ['9z22z', '7qM61']
/e/ => ['1r18i', '5ik80']
/f/ => ['3P42e', '9tv12']
/g/ => ['7j80e', '13y25']
/h/ => ['1k51w', 'u6c74']
/i/ => ['6c85c', 'gT399']
/j/ => ['9V36v', 'z1P58']
/k/ => ['3L88j', '0hi92']
/l/ => ['6j11o', 'e7r33']
/m/ => ['1b82y', 'j1k26']
/n/ => ['2y43e', 'kXO91']
/o/ => ['7h48q', 'W1e12']
/p/ => ['1Z10p', 'M9y53']
/q/ => ['9B32o', '5sf48']
/r/ => ['7W77l', 'n3n27']
/s/ => ['3s43k', '20l85']
/t/ => ['7cY5b', '88o93']
/u/ => ['8i14n', '0Ri04']
/v/ => ['9R81s', '4a118']
/w/ => ['1q43a', 'tU081']
/x/ => ['1a02s', 'pA323']
/y/ => ['9o00e', 'i8j35']
/z/ => ['1j69y', 'D7x91']
}
p "Write something."
input = gets.chomp
output = chiper.each_pair { |f,t| input.gsub! f, t }
puts output
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment