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 =
"\nCREATE TABLE bus_fuels\n (\n name CHARACTER VARYING(255) NOT NULL PRIMARY KEY,\n fuel_name CHARACTER VARYING(255),\n energy_content FLOAT,\n energy_content_units CHARACTER VARYING(255),\n co2_emission_factor FLOAT,\n co2_emission_factor_units CHARACTER VARYING(255),\n co2_biogenic_emission_factor FLOAT,\n co2_biogenic_emission_factor_units CHARACTER VARYING(255),\n ch4_emission_factor FLOAT,\n ch4_emission_factor_units CHARACTER VARYING(255),\n n2o_emission_factor FLOAT,\n n2o_emission_factor_units CHARACTER VARYING(255)\n );\n\n"
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 |