Skip to content

Instantly share code, notes, and snippets.

@keithrbennett
Created June 19, 2011 21:32
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 keithrbennett/1034788 to your computer and use it in GitHub Desktop.
Save keithrbennett/1034788 to your computer and use it in GitHub Desktop.
ReverseEncrypter - Naive Implementation of EncryptionContract
require 'encryption_contract'
# Naive and totally lame encrypter that just reverses the string.
class ReverseEncrypter
include EncryptionContract
def encrypt(s)
s.reverse
end
def decrypt(s)
s.reverse
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment