diff --git a/lib/tel_selections.rb b/lib/tel_selections.rb index 85a0a798503c31362214d65a20a508c88277a8ac..a587350bfb5d30c9e814e302d92fcd9e01fe64d2 100644 --- a/lib/tel_selections.rb +++ b/lib/tel_selections.rb @@ -188,9 +188,19 @@ class TelSelections class CityState Q.register(/\A([^,]+)\s*,\s*([A-Z]{2})\Z/, &method(:new)) + + CITY_MAP = { + "kitchener" => "Kitchener-Waterloo", + "waterloo" => "Kitchener-Waterloo" + }.freeze + + STATE_MAP = { + "QC" => "PQ" + }.freeze + def initialize(city, state) - @city = city - @state = state + @city = CITY_MAP.fetch(city.downcase, city) + @state = STATE_MAP.fetch(state, state) end def iris_query