Sha256: 3939982985afc09427d8b0dcf6795e93cd5d802f23d2341910b2545748557844

Contents?: true

Size: 292 Bytes

Versions: 19

Compression:

Stored size: 292 Bytes

Contents

class ResidenceClass < ActiveRecord::Base
  set_primary_key :name
  
  has_many :residential_energy_consumption_survey_responses

  CLASSIFICATIONS = ['mobile home', 'house', 'apartment']

  def classification
    CLASSIFICATIONS.detect { |c| name.downcase.include? c }
  end

  col :name
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
earth-0.11.10 lib/earth/residence/residence_class.rb
earth-0.11.9 lib/earth/residence/residence_class.rb
earth-0.11.8 lib/earth/residence/residence_class.rb
earth-0.11.7 lib/earth/residence/residence_class.rb
earth-0.11.6 lib/earth/residence/residence_class.rb
earth-0.11.5 lib/earth/residence/residence_class.rb
earth-0.11.4 lib/earth/residence/residence_class.rb
earth-0.11.3 lib/earth/residence/residence_class.rb
earth-0.11.2 lib/earth/residence/residence_class.rb
earth-0.11.1 lib/earth/residence/residence_class.rb
earth-0.11.0 lib/earth/residence/residence_class.rb
earth-0.7.0 lib/earth/residence/residence_class.rb
earth-0.6.6 lib/earth/residence/residence_class.rb
earth-0.6.5 lib/earth/residence/residence_class.rb
earth-0.6.4 lib/earth/residence/residence_class.rb
earth-0.6.3 lib/earth/residence/residence_class.rb
earth-0.6.2 lib/earth/residence/residence_class.rb
earth-0.6.1 lib/earth/residence/residence_class.rb
earth-0.6.0 lib/earth/residence/residence_class.rb