Sha256: 7565893703445df1b1832d2d585f681eeb52a155bbf19c291a6b6e58543d8c9a
Contents?: true
Size: 290 Bytes
Versions: 12
Compression:
Stored size: 290 Bytes
Contents
class Valvat module Checksum class EE < Base def check_digit multipliers = [7, 3, 1, 7, 3, 1, 7, 3] sum = sum_figures_by do |digit, index| digit * multipliers[index] end ((sum / 10.0).ceil * 10).to_i - sum end end end end
Version data entries
12 entries across 12 versions & 1 rubygems