class Valvat::Checksum::GR
Public Instance Methods
check_digit()
click to toggle source
# File lib/valvat/checksum/gr.rb, line 6 def check_digit chk = sum_figures_by do |fig, i| fig * (2**(i + 1)) end.modulo(11) chk > 9 ? 0 : chk end