Class: Wixy::Caesar
- Inherits:
-
Object
- Object
- Wixy::Caesar
- Defined in:
- lib/wixy/caesar.rb
Instance Method Summary collapse
- #decrypt(text) ⇒ Object
- #encrypt(text) ⇒ Object
-
#initialize(config = Config.new) ⇒ Caesar
constructor
A new instance of Caesar.
Constructor Details
Instance Method Details
#decrypt(text) ⇒ Object
15 16 17 |
# File 'lib/wixy/caesar.rb', line 15 def decrypt(text) substitute(text, @cipher_alphabet, @text_alphabet) end |
#encrypt(text) ⇒ Object
11 12 13 |
# File 'lib/wixy/caesar.rb', line 11 def encrypt(text) substitute(text, @text_alphabet, @cipher_alphabet) end |