Sha256: 2962ca23ba91d344dc1137bcbe88582643d3d70782f130474fb72a45a13ad7b5
Contents?: true
Size: 287 Bytes
Versions: 3
Compression:
Stored size: 287 Bytes
Contents
# frozen_string_literal: true class Valvat module Checksum class FR < Base def check_digit siren = str_wo_country[2..-1].to_i (12 + ((3 * siren) % 97)) % 97 end def given_check_digit str_wo_country[0..1].to_i end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
valvat-1.2.1 | lib/valvat/checksum/fr.rb |
valvat-1.2.0 | lib/valvat/checksum/fr.rb |
valvat-1.1.5 | lib/valvat/checksum/fr.rb |