class PostcodeValidation::UseCase::ValidateAddress::FormatValidator
Public Instance Methods
for(country)
click to toggle source
# File lib/postcode_validation/use_case/validate_address/format_validator.rb, line 55 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 when 'TH' FormatValidators::THPostcodeValidator.new when 'MY' FormatValidators::MYPostcodeValidator.new when 'ES' FormatValidators::ESPostcodeValidator.new when 'BR' FormatValidators::BRPostcodeValidator.new when 'AR' FormatValidators::ARPostcodeValidator.new when 'DK' FormatValidators::DKPostcodeValidator.new when 'NO' FormatValidators::NOPostcodeValidator.new when 'CN' FormatValidators::CNPostcodeValidator.new when 'BO' FormatValidators::BOPostcodeValidator.new when 'LA' FormatValidators::LAPostcodeValidator.new when 'BD' FormatValidators::BDPostcodeValidator.new when 'MM' FormatValidators::MMPostcodeValidator.new when 'UY' FormatValidators::UYPostcodeValidator.new when 'PK' FormatValidators::PKPostcodeValidator.new when 'ID' FormatValidators::IDPostcodeValidator.new when 'GR' FormatValidators::GRPostcodeValidator.new when 'IE' FormatValidators::IEPostcodeValidator.new when 'HU' FormatValidators::HUPostcodeValidator.new when 'LK' FormatValidators::LKPostcodeValidator.new when 'BN' FormatValidators::BNPostcodeValidator.new when 'KH' FormatValidators::KHPostcodeValidator.new when 'ZA' FormatValidators::ZAPostcodeValidator.new when 'UA' FormatValidators::UAPostcodeValidator.new when 'TR' FormatValidators::TRPostcodeValidator.new when 'TN' FormatValidators::TNPostcodeValidator.new when 'RU' FormatValidators::RUPostcodeValidator.new when 'PL' FormatValidators::PLPostcodeValidator.new when 'PG' FormatValidators::PGPostcodeValidator.new when 'OM' FormatValidators::OMPostcodeValidator.new when 'MA' FormatValidators::MAPostcodeValidator.new when 'LV' FormatValidators::LVPostcodeValidator.new when 'LT' FormatValidators::LTPostcodeValidator.new when 'KR' FormatValidators::KRPostcodeValidator.new when 'HK' FormatValidators::HKPostcodeValidator.new when 'EE' FormatValidators::EEPostcodeValidator.new when 'DE' FormatValidators::DEPostcodeValidator.new when 'CZ' FormatValidators::CZPostcodeValidator.new when 'CH' FormatValidators::CHPostcodeValidator.new when 'BE' FormatValidators::BEPostcodeValidator.new when 'AT' FormatValidators::ATPostcodeValidator.new when 'AE' FormatValidators::AEPostcodeValidator.new else FormatValidators::NoOpPostcodeValidator.new end end