Class: Nhtsa::Recalls::Years
- Inherits:
-
Object
- Object
- Nhtsa::Recalls::Years
- Defined in:
- lib/nhtsa/recalls.rb
Instance Method Summary collapse
Instance Method Details
#url ⇒ Object
9 10 11 |
# File 'lib/nhtsa/recalls.rb', line 9 def url BASE_URI + END_POINT + DEFAULT_PARAMS end |
#years ⇒ Object
13 14 15 |
# File 'lib/nhtsa/recalls.rb', line 13 def years JSON.parse(open(url).read)["Results"].collect{|year| year["ModelYear"]} end |