Sha256: 9d83eeb682008b3080d8989a9eb73cc07437add95f7fcc239ccf13c7bd57ac37

Contents?: true

Size: 1.14 KB

Versions: 10

Compression:

Stored size: 1.14 KB

Contents

require 'earth/fuel'
class NationalTransitDatabaseRecord < ActiveRecord::Base
  self.primary_key = "name"
  self.table_name = :ntd_records
  
  belongs_to :ntd_company, :foreign_key => 'company_id', :class_name => 'NationalTransitDatabaseCompany'
  
  def self.rail_records
    where(:mode_code => NationalTransitDatabaseMode.rail_modes)
  end
  
  col :name
  col :company_id
  col :mode_code
  col :service_type
  col :vehicle_distance, :type => :float
  col :vehicle_distance_units
  col :vehicle_time, :type => :float
  col :vehicle_time_units
  col :passenger_distance, :type => :float
  col :passenger_distance_units
  col :passengers, :type => :float
  col :electricity, :type => :float
  col :electricity_units
  col :diesel, :type => :float
  col :diesel_units
  col :gasoline, :type => :float
  col :gasoline_units
  col :lpg, :type => :float
  col :lpg_units
  col :lng, :type => :float
  col :lng_units
  col :cng, :type => :float
  col :cng_units
  col :kerosene, :type => :float
  col :kerosene_units
  col :biodiesel, :type => :float
  col :biodiesel_units
  col :other_fuel, :type => :float
  col :other_fuel_units
  col :other_fuel_description
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
earth-0.11.20 lib/earth/rail/national_transit_database_record.rb
earth-0.11.19 lib/earth/rail/national_transit_database_record.rb
earth-0.11.18 lib/earth/rail/national_transit_database_record.rb
earth-0.11.17 lib/earth/rail/national_transit_database_record.rb
earth-0.11.16 lib/earth/rail/national_transit_database_record.rb
earth-0.11.15 lib/earth/rail/national_transit_database_record.rb
earth-0.11.14 lib/earth/rail/national_transit_database_record.rb
earth-0.11.13 lib/earth/rail/national_transit_database_record.rb
earth-0.11.12 lib/earth/rail/national_transit_database_record.rb
earth-0.11.11 lib/earth/rail/national_transit_database_record.rb