Sha256: 0ac5eacfc8c24af5e3f4f7ad80b2550960f9de63b49ec1823bdb632c0533a505
Contents?: true
Size: 343 Bytes
Versions: 14
Compression:
Stored size: 343 Bytes
Contents
# frozen_string_literal: true 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
14 entries across 14 versions & 1 rubygems