Class: Renalware::Feeds::Files::Practices::CountryMap
- Inherits:
-
Object
- Object
- Renalware::Feeds::Files::Practices::CountryMap
- Defined in:
- app/models/renalware/feeds/files/practices/country_map.rb
Defined Under Namespace
Classes: Country
Constant Summary collapse
- UK_COUNTRIES =
[ "ENGLAND", "WALES", "SCOTLAND", "NORTHERN IRELAND" ].freeze
Instance Method Summary collapse
Instance Method Details
#map(country) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/models/renalware/feeds/files/practices/country_map.rb', line 23 def map(country) return if country.blank? if UK_COUNTRIES.include?(country.upcase.strip) Country.new(country: "United Kingdom", region: country.strip.titleize) else Country.new(country: country) end end |