Module: BrighterPlanet::Automobile::Data

Defined in:
lib/automobile/data.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/automobile/data.rb', line 4

def self.included(base)
  base.data_miner do
    schema do
      string   'make_name'
      string   'make_year_name'
      string   'make_model_name'
      string   'make_model_year_name'
      string   'make_model_year_variant_row_hash'
      string   'size_class_name'
      string   'fuel_type_code'
      boolean  'hybridity'
      float    'urbanity'
      float    'fuel_efficiency'
      float    'annual_distance_estimate'
      float    'weekly_distance_estimate'
      float    'daily_distance_estimate'
      float    'daily_duration'
      date     'acquisition'
      date     'retirement'
    end

    process "pull orphans" do
      AutomobileMakeFleetYear.run_data_miner! # sabshere 5/25/10 i'm not sure we actually need to have this in cm1
    end
    
    process :run_data_miner_on_belongs_to_associations
  end
end