Class: ChromeData::Division

Inherits:
CollectionRequest show all
Defined in:
lib/chrome_data/division.rb

Instance Attribute Summary

Attributes inherited from CollectionRequest

#id, #name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from CollectionRequest

parse_response, request_name

Methods inherited from BaseRequest

build_request, client, endpoint_uri, find_elements, #initialize, make_request, parse_response, request, request_name, wsdl_body

Constructor Details

This class inherits a constructor from ChromeData::BaseRequest

Class Method Details

.find_all_by_year(year) ⇒ Object



8
9
10
11
12
# File 'lib/chrome_data/division.rb', line 8

def self.find_all_by_year(year)
  ChromeData.cache "#{request_name.underscore}-model_year-#{year}" do
    request 'modelYear' => year
  end
end

Instance Method Details

#models_for_year(year) ⇒ Object



4
5
6
# File 'lib/chrome_data/division.rb', line 4

def models_for_year(year)
  Model.find_all_by_year_and_division_id year, id
end