Sha256: c8e0e33c04eeba9bcd9b14f153c7ad6e3d36a0ec037eb4f174b81484b90ea98d

Contents?: true

Size: 270 Bytes

Versions: 1

Compression:

Stored size: 270 Bytes

Contents

module Vindetta
  class Validator
    def self.vin(vin)
      length(vin) && check_digit(vin)
    end

    def self.length(vin)
      vin.length == 17
    end

    def self.check_digit(vin)
      Calculator.check_digit(vin) == Decoder.check_digit(vin)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
vindetta-0.17.1 lib/vindetta/validator.rb