Sha256: 0d2ddc40a27bbb7ba9d20661ae781ba6ae2c75ed298a4613d2716ff19dab2aa1
Contents?: true
Size: 237 Bytes
Versions: 16
Compression:
Stored size: 237 Bytes
Contents
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
16 entries across 16 versions & 1 rubygems