Sha256: 8e55e8dc45e856573f58915a9715ab8cc86ea38dfeaa482e6b45da178ca30a36

Contents?: true

Size: 282 Bytes

Versions: 16

Compression:

Stored size: 282 Bytes

Contents

# frozen_string_literal: true

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

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
valvat-2.0.1 lib/valvat/checksum/si.rb
valvat-2.0.0 lib/valvat/checksum/si.rb
valvat-1.4.4 lib/valvat/checksum/si.rb
valvat-1.4.3 lib/valvat/checksum/si.rb
valvat-1.4.2 lib/valvat/checksum/si.rb
valvat-1.4.1 lib/valvat/checksum/si.rb
valvat-1.4.0 lib/valvat/checksum/si.rb
valvat-1.3.0 lib/valvat/checksum/si.rb
valvat-1.2.1 lib/valvat/checksum/si.rb
valvat-1.2.0 lib/valvat/checksum/si.rb
valvat-1.1.5 lib/valvat/checksum/si.rb
valvat-1.1.4 lib/valvat/checksum/si.rb
valvat-1.1.3 lib/valvat/checksum/si.rb
valvat-1.1.2 lib/valvat/checksum/si.rb
valvat-1.1.1 lib/valvat/checksum/si.rb
valvat-1.1.0 lib/valvat/checksum/si.rb