Class: AtlasEngine::Bm::AddressImporter::Corrections::OpenAddress::CityAliasCorrector
- Inherits:
-
Object
- Object
- AtlasEngine::Bm::AddressImporter::Corrections::OpenAddress::CityAliasCorrector
- Extended by:
- T::Sig
- Defined in:
- app/countries/atlas_engine/bm/address_importer/corrections/open_address/city_alias_corrector.rb
Constant Summary collapse
- BM_PARISH_AND_CITY_NAMES =
{ "City of Hamilton" => ["City of Hamilton", "Hamilton"], "Devonshire" => ["Devonshire Parish", "Devonshire"], "Hamilton" => ["Hamilton Parish", "Hamilton"], "Paget" => ["Paget Parish", "Paget"], "Pembroke" => ["Pembroke Parish", "Pembroke"], "Sandys" => ["Sandys Parish", "Sandys"], "Smiths" => ["Smiths Parish", "Smiths"], "Southampton" => ["Southampton Parish", "Southampton"], "St. George's" => ["St. George's Parish", "St. George's"], "Town of St. George" => ["Town of St. George", "St. George"], "Warwick" => ["Warwick Parish", "Warwick"], }.freeze
Class Method Summary collapse
Class Method Details
.apply(address) ⇒ Object
28 29 30 31 32 |
# File 'app/countries/atlas_engine/bm/address_importer/corrections/open_address/city_alias_corrector.rb', line 28 def apply(address) if BM_PARISH_AND_CITY_NAMES.key?(address[:city][0]) address[:city] = BM_PARISH_AND_CITY_NAMES[address[:city][0]] end end |