Sha256: 6491fa33b24f5cdf3bd5aebf4884c2cbe4430f92b3fea904576cd52e43010b5e
Contents?: true
Size: 311 Bytes
Versions: 16
Compression:
Stored size: 311 Bytes
Contents
class Valvat module Checksum class DK < Base check_digit_length 0 def check_digit weight = [2, 7, 6, 5, 4, 3, 2, 1] figures.map do |fig| fig * weight.shift end.inject(:+).modulo(11) end def given_check_digit 0 end end end end
Version data entries
16 entries across 16 versions & 1 rubygems