Class: Valvat::Checksum::PT

Inherits:
Base
  • Object
show all
Defined in:
lib/valvat/checksum/pt.rb

Instance Attribute Summary

Attributes inherited from Base

#vat

Instance Method Summary collapse

Methods inherited from Base

check_digit_length, #initialize, #validate

Constructor Details

This class inherits a constructor from Valvat::Checksum::Base

Instance Method Details

#check_digitObject



6
7
8
9
# File 'lib/valvat/checksum/pt.rb', line 6

def check_digit
  chk = sum_of_figues_for_pt_si
  chk > 9 ? 0 : chk
end