Sha256: 950dac40348187134aa72668d652b237ffa77c3713c49591f519e36fcc6b8c84
Contents?: true
Size: 288 Bytes
Versions: 2
Compression:
Stored size: 288 Bytes
Contents
module Vindetta class Transliterator MAPPING = '0123456789.ABCDEFGH..JKLMN.P.R..STUVWXYZ'.split('').freeze def self.run(character) index = MAPPING.find_index(character) raise Vindetta::InvalidCharacter.new(character) unless index index % 10 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
vindetta-0.5.0 | lib/vindetta/transliterator.rb |
vindetta-0.4.0 | lib/vindetta/transliterator.rb |