lib/valvat/checksum/se.rb in valvat-1.0.1 vs lib/valvat/checksum/se.rb in valvat-1.1.0
- old
+ new
@@ -1,13 +1,15 @@
+# frozen_string_literal: true
+
class Valvat
module Checksum
class SE < Base
check_digit_length 0
def validate
- vat.to_s_wo_country[-2..-1].to_i > 0 &&
- super
+ vat.to_s_wo_country[-2..-1].to_i.positive? &&
+ super
end
private
def check_digit
@@ -21,6 +23,6 @@
def str_wo_country
vat.to_s_wo_country[0..9]
end
end
end
-end
\ No newline at end of file
+end