Class: Nhtsa::Recalls::Years

Inherits:
Object
  • Object
show all
Defined in:
lib/nhtsa/recalls.rb

Instance Method Summary collapse

Instance Method Details

#urlObject



9
10
11
# File 'lib/nhtsa/recalls.rb', line 9

def url
  BASE_URI + END_POINT + DEFAULT_PARAMS
end

#yearsObject



13
14
15
# File 'lib/nhtsa/recalls.rb', line 13

def years
  JSON.parse(open(url).read)["Results"].collect{|year| year["ModelYear"]}
end