Class: ChromeData::Model

Inherits:
CollectionRequest show all
Defined in:
lib/chrome_data/model.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_and_division_id(year, division_id) ⇒ Object



7
8
9
10
11
# File 'lib/chrome_data/model.rb', line 7

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

Instance Method Details

#stylesObject



3
4
5
# File 'lib/chrome_data/model.rb', line 3

def styles
  Style.find_all_by_model_id id
end