Module: SubCipher

Defined in:
lib/sub_cipher.rb,
lib/sub_cipher/version.rb,
lib/sub_cipher/sub_cipher_error.rb

Defined Under Namespace

Classes: SubCipherError, SubCipherObject

Constant Summary collapse

ALPHABETS =

The alphabet seed

('a'..'z')
SUPPORTED_OPTS =

The supported options

{
  :seed => {
    :abbr => :s,
    :type => String
  },
  :map => {
    :abbr => :m,
    :type => String
  },
  :keep_case => {
    :abbr => :k
  },
}
DEFAULT_OPTS =

The default options

{
  :seed => [ALPHABETS.to_a, ALPHABETS.to_a.map{ |a| a.upcase }].flatten.join,
  :keep_case => true
}
VERSION =
"1.0.1"

Class Method Summary collapse

Class Method Details

.gen(options = {}) ⇒ SubCipherObject

The major method to generate a sub cipher.

Raises:


37
38
39
# File 'lib/sub_cipher.rb', line 37

def SubCipher.gen(options = {})
  SubCipherObject.new(options)
end