Ruby implementation of simple text ciphers