Skip to content

Instantly share code, notes, and snippets.

@jamesgecko
Created March 29, 2018 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesgecko/f85372acc2ede05661bf411037f34fbb to your computer and use it in GitHub Desktop.
Save jamesgecko/f85372acc2ede05661bf411037f34fbb to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
lookup = {
a: 'a', b: 'b', c: 'c', d: 'd', e: 'e', f: 'f', g: 'g', h: 'h',
i: 'i', j: 'j', k: 'k', l: 'l', m: 'm', n: 'n', o: 'o', p: 'p',
q: 'q', r: 'r', s: 's', t: 't', u: 'u', v: 'v', w: 'w', x: 'x',
y: 'y', z: 'z', A: 'A', B: 'B', C: 'C', D: 'D', E: 'E', F: 'F',
G: 'G', H: 'H', I: 'I', J: 'J', K: 'K', L: 'L', M: 'M', N: 'N',
O: 'O', P: 'P', Q: 'Q', R: 'R', S: 'S', T: 'T', U: 'U', V: 'V',
W: 'W', X: 'X', Y: 'Y', Z: 'Z'
}
print ARGV[0].split('').map {|c| lookup[c.to_sym] }.join('')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment