Class: GreenhouseGas

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
Earth::Model
Defined in:
lib/earth/fuel/greenhouse_gas.rb

Constant Summary collapse

TABLE_STRUCTURE =
<<-EOS

CREATE TABLE greenhouse_gases
  (
     name                     CHARACTER VARYING(255) NOT NULL PRIMARY KEY,
     abbreviation             CHARACTER VARYING(255),
     ipcc_report              CHARACTER VARYING(255),
     time_horizon             INTEGER,
     time_horizon_units       CHARACTER VARYING(255),
     global_warming_potential INTEGER
  );

EOS

Class Method Summary collapse

Methods included from Earth::Model

extend_mining, extended, registry

Class Method Details

.[](abbreviation) ⇒ Object



23
24
25
# File 'lib/earth/fuel/greenhouse_gas.rb', line 23

def [](abbreviation)
  find_by_abbreviation abbreviation.to_s
end