lib/lite/validators/isin_validator.rb in lite-validators-1.0.7 vs lib/lite/validators/isin_validator.rb in lite-validators-1.1.0

- old
+ new

@@ -10,11 +10,11 @@ def valid_attr? valid_regexp? && valid_checksum? end - # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength + # rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity def valid_checksum? characters = value.chars digits = characters.map { |chr| /[A-Z]/.match?(chr) ? (chr.ord - 55) : chr.to_i } even_values = digits.values_at(*digits.each_index.select(&:even?)) odd_values = digits.values_at(*digits.each_index.select(&:odd?)) @@ -29,8 +29,8 @@ values = longest.concat(shortest).to_s.scan(/./).map(&:to_i) total = values.inject(&:+) (10 - (total % 10)) % 10 end - # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength + # rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/MethodLength, Metrics/PerceivedComplexity end