vin-validator 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/vin_validator/maker.rb +3 -1
- data/lib/vin_validator/makers.json +1830 -0
- data/lib/vin_validator/version.rb +1 -1
- data/lib/vin_validator/wmi.rb +3 -1
- data/lib/vin_validator/wmis.json +6062 -0
- metadata +3 -1
data/lib/vin_validator/wmi.rb
CHANGED
@@ -6,7 +6,9 @@ module VinValidator
|
|
6
6
|
def all
|
7
7
|
return @all if defined?(@all)
|
8
8
|
|
9
|
-
@all = JSON.parse(File.read('wmis.json'), { symbolize_names: true }).to_h
|
9
|
+
@all = JSON.parse(File.read(File.join(__dir__, 'wmis.json')), { symbolize_names: true }).to_h do |id, v|
|
10
|
+
[id.to_s, new(**v)]
|
11
|
+
end
|
10
12
|
end
|
11
13
|
|
12
14
|
def find(id)
|