Sha256: c132f012111f75bb6a3b5b1136d0903dbafcad14bd19e178a80d14e0eb6839a2

Contents?: true

Size: 1.11 KB

Versions: 9

Compression:

Stored size: 1.11 KB

Contents

class NationalTransitDatabaseRecord < ActiveRecord::Base
  set_primary_key :name
  set_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

9 entries across 9 versions & 1 rubygems

Version Path
earth-0.11.7 lib/earth/rail/national_transit_database_record.rb
earth-0.11.6 lib/earth/rail/national_transit_database_record.rb
earth-0.11.5 lib/earth/rail/national_transit_database_record.rb
earth-0.11.4 lib/earth/rail/national_transit_database_record.rb
earth-0.11.3 lib/earth/rail/national_transit_database_record.rb
earth-0.11.2 lib/earth/rail/national_transit_database_record.rb
earth-0.11.1 lib/earth/rail/national_transit_database_record.rb
earth-0.11.0 lib/earth/rail/national_transit_database_record.rb
earth-0.7.0 lib/earth/rail/national_transit_database_record.rb