Sha256: 8c462c23c61af2fac92e91653b1fc32649464072faecf97d78a872f710a5d90e
Contents?: true
Size: 785 Bytes
Versions: 28
Compression:
Stored size: 785 Bytes
Contents
# frozen_string_literal: true 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
28 entries across 28 versions & 1 rubygems