13
14
15
16
17
18
19
20
21
22
23
|
# File 'app/lib/atlas_engine/validation_transcriber/address_parser_factory.rb', line 13
def create(address:, locale: nil)
raise ArgumentError, "country_code cannot be nil" if address.country_code.nil?
profile = CountryProfile.for(T.must(address.country_code), locale)
if locale.nil? && profile.validation.multi_locale?
raise ArgumentError, "#{address.country_code} is a multi-locale country and requires a locale"
end
profile.validation.address_parser.new(address: address)
end
|