Sha256: c3baff8e2608c365da8e7f23fb90103dad4107149949c78d46195465c9ba6a1f
Contents?: true
Size: 242 Bytes
Versions: 8
Compression:
Stored size: 242 Bytes
Contents
require 'valvat/checksum' class Valvat module Checksum class GR < Base def check_digit chk = sum_figures_by do |fig, i| fig*(2**(i+1)) end.modulo(11) chk > 9 ? 0 : chk end end end end
Version data entries
8 entries across 8 versions & 1 rubygems