14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/postcode_validation/use_case/validate_address/format_validator.rb', line 14
def for(country)
case country
when 'NL'
FormatValidators::NLPostcodeValidator.new
when 'GB'
FormatValidators::GBPostcodeValidator.new
when 'BE'
FormatValidators::BEPostcodeValidator.new
when 'FR'
FormatValidators::FRPostcodeValidator.new
when 'SG'
FormatValidators::SGPostcodeValidator.new
when 'IN'
FormatValidators::INPostcodeValidator.new
when 'VN'
FormatValidators::VNPostcodeValidator.new
else
FormatValidators::NoOpPostcodeValidator.new
end
end
|