class Encrubto::Rot13::Encryptor
Constants
- ORI
- ROT
Public Instance Methods
decrypt(encrypted)
click to toggle source
# File lib/encrubto/rot13/encryptor.rb, line 15 def decrypt(encrypted) encrypt(encrypted) end
encrypt(str)
click to toggle source
# File lib/encrubto/rot13/encryptor.rb, line 7 def encrypt(str) if str.is_a? String str.tr("#{ ORI }#{ ORI.upcase }", "#{ ROT }#{ ROT.upcase }") else raise 'Param must be String!' end end