Class: USGeo::Region
- Inherits:
-
BaseRecord
- Object
- ActiveRecord::Base
- BaseRecord
- USGeo::Region
- Defined in:
- lib/us_geo/region.rb
Overview
U.S. region.
Constant Summary
Constants inherited from BaseRecord
BaseRecord::STATUS_IMPORTED, BaseRecord::STATUS_MANUAL, BaseRecord::STATUS_REMOVED
Class Method Summary collapse
Methods inherited from BaseRecord
#imported?, #manual?, #removed?
Class Method Details
.load!(uri = nil) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/us_geo/region.rb', line 14 def load!(uri = nil) location = data_uri(uri || "divisions.csv") import! do load_data_file(location) do |row| load_record!(id: row["Region ID"]) do |record| record.name = row["Region Name"] end end end end |