lib/vindetta/validator.rb in vindetta-0.19.0 vs lib/vindetta/validator.rb in vindetta-0.20.0

- old
+ new

@@ -1,14 +1,16 @@ module Vindetta class Validator def self.vin(vin) return false unless vin.length == Vindetta::VIN_LENGTH - Calculator.check_digit(vin) == Decoder.check_digit(vin) + Calculator.check_digit(vin) == Decoder.vin(vin)[:check_digit] end def self.wmi(wmi) return false unless wmi.length == Vindetta::WMI_LENGTH + + true end def self.vds(vds) return false unless vds.length == Vindetta::VDS_LENGTH