Class: GreenButtonAdoption
  
  
  
  
  
    - Inherits:
 
    - 
      ActiveRecord::Base
      
        
          - Object
 
          
            - ActiveRecord::Base
 
          
            - GreenButtonAdoption
 
          
        
        show all
      
     
  
  
  
  
  
      - Extended by:
 
      - Earth::Model
 
  
  
  
  
  
  
  
  
    - Defined in:
 
    - lib/earth/electricity/green_button_adoption.rb
 
  
  
 
  
    
      Constant Summary
      collapse
    
    
      
        - TABLE_STRUCTURE =
          
        
 
        <<-EOS
CREATE TABLE green_button_adoptions
  (
     electric_utility_name CHARACTER VARYING(255) NOT NULL PRIMARY KEY,
     implemented           BOOLEAN,
     committed             BOOLEAN
  );
EOS 
      
    
  
  
    
      Class Method Summary
      collapse
    
    
  
  
  
  
  
  
  
  
  
  
  extend_mining, extended, registry
  
  
    Class Method Details
    
      
  
  
    .committed?(*names)  ⇒ Boolean 
  
  
  
  
    
      
25
26
27
28
29 
     | 
    
      # File 'lib/earth/electricity/green_button_adoption.rb', line 25
def committed?(*names)
  names.any? do |name|
    find_by_electric_utility_name(name).try :committed?
  end
end
     | 
  
 
    
      
  
  
    .implemented?(*names)  ⇒ Boolean 
  
  
  
  
    
      
20
21
22
23
24 
     | 
    
      # File 'lib/earth/electricity/green_button_adoption.rb', line 20
def implemented?(*names)
  names.any? do |name|
    find_by_electric_utility_name(name).try :implemented?
  end
end
     |