Class: ResidenceClass

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

Constant Summary collapse

TABLE_STRUCTURE =
"\nCREATE TABLE residence_classes\n  (\n     name CHARACTER VARYING(255) NOT NULL PRIMARY KEY\n  );\n\n"
CLASSIFICATIONS =
['mobile home', 'house', 'apartment']

Instance Method Summary collapse

Methods included from Earth::Model

extend_mining, extended, registry

Instance Method Details

#classificationObject



23
24
25
# File 'lib/earth/residence/residence_class.rb', line 23

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