class Nhtsa::Recalls::Years

Public Instance Methods

url() click to toggle source
# File lib/nhtsa/recalls/years.rb, line 5
def url
  "#{BASE_URI}#{END_POINT}#{DEFAULT_PARAMS}"
end
years() click to toggle source
# File lib/nhtsa/recalls/years.rb, line 9
def years
  JSON.parse(open(url).read)["Results"].collect{|year| year["ModelYear"]}
end