Class: Cipher::Rot13

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

Overview

Rot13

Special version for Internet, using offset of 13.

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

- (Rot13) initialize(offset = 13)

initialize



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

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