Class: State

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

Constant Summary collapse

TABLE_STRUCTURE =
<<-EOS

CREATE TABLE states
  (
     postal_abbreviation                                CHARACTER VARYING(255) NOT NULL PRIMARY KEY,
     fips_code                                          INTEGER,
     name                                               CHARACTER VARYING(255),
     census_division_number                             INTEGER,
     petroleum_administration_for_defense_district_code CHARACTER VARYING(255),
     population                                         INTEGER,
     electricity_emission_factor                        FLOAT,
     electricity_emission_factor_units                  CHARACTER VARYING(255),
     electricity_loss_factor                            FLOAT
  );

EOS

Instance Method Summary collapse

Methods included from Earth::Model

extend_mining, extended, registry

Instance Method Details

#countryObject



47
48
49
# File 'lib/earth/locality/state.rb', line 47

def country
  Country.united_states
end