Sha256: 7e92b87d09912276b3e914f46dd6cd349257eaa6aefce5c616e20361455f8da5

Contents?: true

Size: 273 Bytes

Versions: 8

Compression:

Stored size: 273 Bytes

Contents

require 'valvat/checksum'

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

8 entries across 8 versions & 1 rubygems

Version Path
valvat-0.6.7 lib/valvat/checksum/si.rb
valvat-0.6.6 lib/valvat/checksum/si.rb
valvat-0.6.5 lib/valvat/checksum/si.rb
valvat-0.6.4 lib/valvat/checksum/si.rb
valvat-0.6.3 lib/valvat/checksum/si.rb
valvat-0.6.2 lib/valvat/checksum/si.rb
valvat-0.6.1 lib/valvat/checksum/si.rb
valvat-0.6.0 lib/valvat/checksum/si.rb