Class: ResidenceClass

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/earth/residence/residence_class.rb

Constant Summary collapse

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

Instance Method Summary collapse

Instance Method Details

#classificationObject



9
10
11
# File 'lib/earth/residence/residence_class.rb', line 9

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