Sha256: f35ddc20c9df0cd845ea9e4325b6523e0b5f359b4b45f782063c91402e3de91f
Contents?: true
Size: 305 Bytes
Versions: 9
Compression:
Stored size: 305 Bytes
Contents
# frozen_string_literal: true class Valvat module Checksum class HU < Base def check_digit multipliers = [3, 7, 9, 1, 3, 7, 9] sum = sum_figures_by do |digit, index| digit * multipliers[index] end (10 - (sum % 10)) % 10 end end end end
Version data entries
9 entries across 9 versions & 1 rubygems