Class: BusFuel
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BusFuel
- Extended by:
- Earth::Model
- Defined in:
- lib/earth/bus/bus_fuel.rb
Constant Summary collapse
- TABLE_STRUCTURE =
<<-EOS CREATE TABLE bus_fuels ( name CHARACTER VARYING(255) NOT NULL PRIMARY KEY, fuel_name CHARACTER VARYING(255), energy_content FLOAT, energy_content_units CHARACTER VARYING(255), co2_emission_factor FLOAT, co2_emission_factor_units CHARACTER VARYING(255), co2_biogenic_emission_factor FLOAT, co2_biogenic_emission_factor_units CHARACTER VARYING(255), ch4_emission_factor FLOAT, ch4_emission_factor_units CHARACTER VARYING(255), n2o_emission_factor FLOAT, n2o_emission_factor_units CHARACTER VARYING(255) ); EOS
Instance Method Summary collapse
Methods included from Earth::Model
extend_mining, extended, registry
Instance Method Details
#latest_fuel_year_controls ⇒ Object
34 35 36 |
# File 'lib/earth/bus/bus_fuel.rb', line 34 def latest_fuel_year_controls fuel_year_controls.where :year => fuel_year_controls.maximum(:year) end |