Sha256: 7515bd78a56ccd7165f883f057c8becaa326662cf5a4dce43594ab5718cc0e17

Contents?: true

Size: 493 Bytes

Versions: 7

Compression:

Stored size: 493 Bytes

Contents

class GreenButtonAdoption < ActiveRecord::Base
  self.primary_key = "electric_utility_name"
  
  col :electric_utility_name
  col :implemented, :type => :boolean
  col :committed, :type => :boolean

  class << self
    def implemented?(*names)
      names.any? do |name|
        find_by_electric_utility_name(name).try :implemented?
      end
    end
    def committed?(*names)
      names.any? do |name|
        find_by_electric_utility_name(name).try :committed?
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
earth-0.12.4 lib/earth/electricity/green_button_adoption.rb
earth-0.12.3 lib/earth/electricity/green_button_adoption.rb
earth-0.12.2 lib/earth/electricity/green_button_adoption.rb
earth-0.12.1 lib/earth/electricity/green_button_adoption.rb
earth-0.12.0 lib/earth/electricity/green_button_adoption.rb
earth-0.11.20 lib/earth/electricity/green_button_adoption.rb
earth-0.11.19 lib/earth/electricity/green_button_adoption.rb