Sha256: afac1fc07779eaebbc636843aba498c4f0c53df219ae00478c2ab260f66b084e

Contents?: true

Size: 404 Bytes

Versions: 21

Compression:

Stored size: 404 Bytes

Contents

class ResidenceClass < ActiveRecord::Base
  set_primary_key :name
  
  has_many :residences
  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

21 entries across 21 versions & 2 rubygems

Version Path
earth-0.3.3 lib/earth/residence/residence_class.rb
earth-0.3.2 lib/earth/residence/residence_class.rb
earth-0.3.1 lib/earth/residence/residence_class.rb
earth-0.3.0 lib/earth/residence/residence_class.rb
earth-0.2.14 lib/earth/residence/residence_class.rb
earth-0.2.13 lib/earth/residence/residence_class.rb
earth-0.2.12 lib/earth/residence/residence_class.rb
earth-0.2.11 lib/earth/residence/residence_class.rb
earth-0.2.9 lib/earth/residence/residence_class.rb
earth-0.2.8 lib/earth/residence/residence_class.rb
earth-0.2.7 lib/earth/residence/residence_class.rb
earth-0.2.6 lib/earth/residence/residence_class.rb
earth-0.2.5 lib/earth/residence/residence_class.rb
earth-0.2.4 lib/earth/residence/residence_class.rb
earth-ruby19-0.2.3 lib/earth/residence/residence_class.rb
earth-0.2.3 lib/earth/residence/residence_class.rb
earth-0.2.2 lib/earth/residence/residence_class.rb
earth-0.2.1 lib/earth/residence/residence_class.rb
earth-0.2.0 lib/earth/residence/residence_class.rb
earth-0.1.4 lib/earth/residence/residence_class.rb