Class: Valvat::Checksum::SI
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
check_digit_length, #initialize
Constructor Details
This class inherits a constructor from Valvat::Checksum::Base
Instance Method Details
#check_digit ⇒ Object
11 12 13 14 |
# File 'lib/valvat/checksum/si.rb', line 11 def check_digit chk = sum_of_figues_for_pt_si chk == 10 ? 0 : chk end |
#validate ⇒ Object
6 7 8 9 |
# File 'lib/valvat/checksum/si.rb', line 6 def validate figures_str.to_i > 999_999 && super end |