class Nhtsa::Recalls::Manufacturers

Public Class Methods

new(year) click to toggle source
# File lib/nhtsa/recalls/manufacturers.rb, line 4
def initialize(year)
  @year = year
end

Public Instance Methods

manufacturers() click to toggle source
# File lib/nhtsa/recalls/manufacturers.rb, line 12
def manufacturers
  JSON.parse(open(url).read)["Results"].collect{|manufacturer| manufacturer["Make"]}
end
url() click to toggle source
# File lib/nhtsa/recalls/manufacturers.rb, line 8
def url
  "#{BASE_URI}#{END_POINT}/#{@year}#{DEFAULT_PARAMS}"
end