Class: Nhtsa::Recalls::Years

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

Instance Method Summary collapse

Instance Method Details

#urlObject



5
6
7
# File 'lib/nhtsa/recalls/years.rb', line 5

def url
  BASE_URI + END_POINT + DEFAULT_PARAMS
end

#yearsObject



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

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