Sha256: 749f298a2eca5b7dd333535fa76448c0af4af98bdd3b2f69d72ef9ed9250d39c

Contents?: true

Size: 246 Bytes

Versions: 11

Compression:

Stored size: 246 Bytes

Contents

class Valvat
  module Checksum
    class SI < Base
      def validate
        figures_str.to_i > 999999 &&
        super
      end

      def check_digit
        chk = sum_of_figues_for_pt_si
        chk == 1 ? 0 : chk
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
valvat-0.8.1 lib/valvat/checksum/si.rb
valvat-0.8.0 lib/valvat/checksum/si.rb
valvat-0.7.4 lib/valvat/checksum/si.rb
valvat-0.7.3 lib/valvat/checksum/si.rb
valvat-0.7.2 lib/valvat/checksum/si.rb
valvat-0.7.1 lib/valvat/checksum/si.rb
valvat-0.7.0 lib/valvat/checksum/si.rb
valvat-0.6.11 lib/valvat/checksum/si.rb
valvat-0.6.10 lib/valvat/checksum/si.rb
valvat-0.6.9 lib/valvat/checksum/si.rb
valvat-0.6.8 lib/valvat/checksum/si.rb