lib/europe/vat/format.rb in europe-0.0.6 vs lib/europe/vat/format.rb in europe-0.0.7
- old
+ new
@@ -41,10 +41,10 @@
return false unless VAT_REGEX.keys.include?(country_code)
match_vat_number(number, country_code)
end
def self.sanitize_number(number, country_code)
- if [:GB, :DK, :FR].include?(country_code)
+ if %i[GB DK FR].include?(country_code)
number.gsub(/\.|\t/, '').upcase
else
number.gsub(/\.|\t|\s/, '').upcase
end
end