Sha256: 1f89d416e19d0df81235325ada24b9ad32279c7a9d4ab4caf36b3bd026e32bc8
Contents?: true
Size: 284 Bytes
Versions: 10
Compression:
Stored size: 284 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, character unless index index % 10 end end end
Version data entries
10 entries across 10 versions & 1 rubygems