Sha256: 00948d95778897161d072402572f6003588da7544b5c3bb025d380e9deae1c32

Contents?: true

Size: 409 Bytes

Versions: 8

Compression:

Stored size: 409 Bytes

Contents

AircraftClass.class_eval do
  data_miner do
    process "Derive aircraft classes from Aircraft" do
      Aircraft.run_data_miner!
      connection.select_values("SELECT DISTINCT class_code FROM aircraft WHERE class_code IS NOT NULL").each do |class_code|
        AircraftClass.find_or_create_by_code(class_code)
      end
    end
    
    process :update_averages!
    
    # FIXME TODO verify this
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
earth-0.7.0 lib/earth/air/aircraft_class/data_miner.rb
earth-0.6.6 lib/earth/air/aircraft_class/data_miner.rb
earth-0.6.5 lib/earth/air/aircraft_class/data_miner.rb
earth-0.6.4 lib/earth/air/aircraft_class/data_miner.rb
earth-0.6.3 lib/earth/air/aircraft_class/data_miner.rb
earth-0.6.2 lib/earth/air/aircraft_class/data_miner.rb
earth-0.6.1 lib/earth/air/aircraft_class/data_miner.rb
earth-0.6.0 lib/earth/air/aircraft_class/data_miner.rb