Class: Vindetta::Transliterator
- Inherits:
-
Object
- Object
- Vindetta::Transliterator
- Defined in:
- lib/vindetta/transliterator.rb
Constant Summary collapse
- MAPPING =
'0123456789.ABCDEFGH..JKLMN.P.R..STUVWXYZ'.split('').freeze
Class Method Summary collapse
Class Method Details
.run(character) ⇒ Object
5 6 7 8 9 |
# File 'lib/vindetta/transliterator.rb', line 5 def self.run(character) index = MAPPING.find_index(character) raise Vindetta::InvalidCharacter.new(character) unless index index % 10 end |