Class: ElectricityMix
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ElectricityMix
show all
- Extended by:
- Earth::Model
- Defined in:
- lib/earth/locality/electricity_mix.rb
Constant Summary
collapse
- TABLE_STRUCTURE =
"\nCREATE TABLE electricity_mixes\n (\n name CHARACTER VARYING(255) NOT NULL PRIMARY KEY,\n egrid_subregion_abbreviation CHARACTER VARYING(255),\n state_postal_abbreviation CHARACTER VARYING(255),\n country_iso_3166_code 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 loss_factor FLOAT\n );\n\n"
Instance Method Summary
collapse
extend_mining, extended, registry
Instance Method Details
#energy_content ⇒ Object
30
31
32
|
# File 'lib/earth/locality/electricity_mix.rb', line 30
def energy_content
1.kilowatt_hours.to(:megajoules)
end
|
#energy_content_units ⇒ Object
34
35
36
|
# File 'lib/earth/locality/electricity_mix.rb', line 34
def energy_content_units
'megajoules_per_kilowatt_hour'
end
|