This Ruby script will generate a cryptogram out of any text file. A cryptogram is a word or phrase in which each letter is replaced with a different letter from the alphabet. For example, all of the E's can be replaced with J's, and the T's with M's. The objective is to find out which letters map to each other and decrypt the original message.
Generating a cryptogram is easy, but this script takes a few shortcuts to make it less verbose. In particular, the zip and flatten array methods are used to help generate a lookup table for the cryptogram.