lib/vindetta/decoder.rb in vindetta-0.17.1 vs lib/vindetta/decoder.rb in vindetta-0.19.0
- old
+ new
@@ -5,11 +5,11 @@
module Vindetta
class Decoder
CHECK_DIGIT_INDEX = 8
def self.vin(vin)
- Result.new(Api.get(vin)["Results"])
+ Result.new(Api.decode(vin)["Results"])
end
def self.plant_code(vin)
vin[10]
end
@@ -21,10 +21,10 @@
def self.wmi(vin)
vin[0..2]
end
def self.vds(vin, options = {})
- defaults = { :check_digit => true }
+ defaults = { check_digit: true }
options = defaults.merge(options)
vin[3..CHECK_DIGIT_INDEX].tap do |vds|
vds.chop! unless options[:check_digit]
end