Class: Cipher::Caesar

Inherits:
Substitution show all
Defined in:
lib/cipher/caesar.rb

Overview

Caesar

Caesar cipher, monoalphabetic substitution, offset is 3

Instance Attribute Summary

Attributes inherited from Substitution

#key

Instance Method Summary (collapse)

Methods inherited from Substitution

#decode, #encode

Methods inherited from SimpleCipher

#decode, #encode

Constructor Details

- (Caesar) initialize(offset = 3)

initialize



21
22
23
# File 'lib/cipher/caesar.rb', line 21

def initialize(offset = 3)
  @key = Key::Caesar.new(offset)
end