Sha256: b8debce782dbea7d1f4ea1401768a35e1159dfe66a160b4448b3cf04b6e32cb9
Contents?: true
Size: 1.11 KB
Versions: 3
Compression:
Stored size: 1.11 KB
Contents
require 'flight' class FlightRecord < ActiveRecord::Base include Sniff::Emitter include BrighterPlanet::Flight set_table_name 'flight_records' belongs_to :origin_airport, :class_name => 'Airport' belongs_to :destination_airport, :class_name => 'Airport' belongs_to :distance_class, :class_name => 'FlightDistanceClass' belongs_to :fuel_type, :class_name => 'FlightFuelType' belongs_to :propulsion, :class_name => 'FlightPropulsion' belongs_to :aircraft_class belongs_to :aircraft belongs_to :seat_class, :class_name => 'FlightSeatClass' belongs_to :airline belongs_to :domesticity, :class_name => 'FlightDomesticity' falls_back_on :trips => 1.941, # http://www.bts.gov/publications/america_on_the_go/long_distance_transportation_patterns/html/table_07.html :emplanements_per_trip => 1.67, :distance_estimate => 2077.4455, :load_factor => lambda { FlightSegment.fallback.load_factor } class << self def research(key) case key when :route_inefficiency_factor 1.07 when :dogleg_factor 1.25 end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
flight-0.0.6 | lib/test_support/flight_record.rb |
flight-0.0.5 | lib/test_support/flight_record.rb |
flight-0.0.4 | lib/test_support/flight_record.rb |