Sha256: f5b3181aeb36d761e988ec3df7eb239d67e60a48a05f7bddb3218fd3a3809174
Contents?: true
Size: 753 Bytes
Versions: 17
Compression:
Stored size: 753 Bytes
Contents
require_dependency "renalware/feeds" module Renalware module Feeds module Files module Practices class CountryMap UK_COUNTRIES = [ "ENGLAND", "WALES", "SCOTLAND", "NORTHERN IRELAND" ].freeze class Country include Virtus.model attribute :region attribute :country end 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 end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems