Sha256: 6246f6b7e869030ba5c052f1d39c927b6109c3a1117277609cec7e3995741d9f

Contents?: true

Size: 381 Bytes

Versions: 25

Compression:

Stored size: 381 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

  data_miner do
    tap "Brighter Planet's sanitized residence class data", Earth.taps_server
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
earth-0.3.8 lib/earth/residence/residence_class.rb
earth-0.3.7 lib/earth/residence/residence_class.rb
earth-0.3.6 lib/earth/residence/residence_class.rb
earth-0.3.5 lib/earth/residence/residence_class.rb
earth-0.3.4 lib/earth/residence/residence_class.rb