Class: ElectricUtility

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

Constant Summary collapse

TABLE_STRUCTURE =
<<-EOS

CREATE TABLE electric_utilities
  (
     eia_id                          INTEGER NOT NULL PRIMARY KEY,
     name                            CHARACTER VARYING(255),
     nickname                        CHARACTER VARYING(255),
     state_postal_abbreviation       CHARACTER VARYING(255),
     nerc_region_abbreviation        CHARACTER VARYING(255),
     second_nerc_region_abbreviation CHARACTER VARYING(255)
  );

EOS

Instance Method Summary collapse

Methods included from Earth::Model

extend_mining, extended, registry

Instance Method Details

#green_button_committer?Boolean

Returns:

  • (Boolean)


41
42
43
# File 'lib/earth/electricity/electric_utility.rb', line 41

def green_button_committer?
  GreenButtonAdoption.committed? name, nickname
end

#green_button_implementer?Boolean

Returns:

  • (Boolean)


37
38
39
# File 'lib/earth/electricity/electric_utility.rb', line 37

def green_button_implementer?
  GreenButtonAdoption.implemented? name, nickname
end