Sha256: 4e023a290faae1e292ab6254c298d09877db30af3e41b81036b6884688d7a0f3

Contents?: true

Size: 508 Bytes

Versions: 3

Compression:

Stored size: 508 Bytes

Contents

module TwidMapping
  TWID_LETTER = {
    "A" => [1, 0], "B" => [1, 1], "C" => [1, 2], "D" => [1, 3],
    "E" => [1, 4], "F" => [1, 5], "G" => [1, 6], "H" => [1, 7],
    "I" => [3, 4], "J" => [1, 8], "K" => [1, 9], "L" => [2, 0],
    "M" => [2, 1], "N" => [2, 2], "O" => [3, 5], "P" => [2, 3],
    "Q" => [2, 4], "R" => [2, 5], "S" => [2, 6], "T" => [2, 7],
    "U" => [2, 8], "V" => [2, 9], "W" => [3, 2], "X" => [3, 0],
    "Y" => [3, 1], "Z" => [3, 3]
  }

  MULTIPLIER = [1,9,8,7,6,5,4,3,2,1,1].freeze
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
taiwanese_id_validator-0.0.3 lib/taiwanese_id_validator/twid_mapping.rb
taiwanese_id_validator-0.0.2 lib/taiwanese_id_validator/twid_mapping.rb
taiwanese_id_validator-0.0.1 lib/taiwanese_id_validator/twid_mapping.rb