Sha256: 0c5446e34d56b007d9611de596150afdf50a48f4c8cd22145990aef237007fa8
Contents?: true
Size: 264 Bytes
Versions: 9
Compression:
Stored size: 264 Bytes
Contents
require 'valvat/checksum' class Valvat module Checksum class PL < Base def check_digit weight = [6, 5, 7, 2, 3, 4, 5, 6, 7] figures.map do |fig| fig * weight.shift end.inject(:+).modulo(11) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems