Class: AtlasEngine::Kr::AddressValidation::Validators::FullAddress::Exclusions::City
- Inherits:
-
AddressValidation::Validators::FullAddress::Exclusions::ExclusionBase
- Object
- AddressValidation::Validators::FullAddress::Exclusions::ExclusionBase
- AtlasEngine::Kr::AddressValidation::Validators::FullAddress::Exclusions::City
- Extended by:
- T::Sig
- Defined in:
- app/countries/atlas_engine/kr/address_validation/validators/full_address/exclusions/city.rb
Constant Summary collapse
- COMPONENT_IDENTIFIER =
{ si: "시", gu: "구", }.freeze
Class Method Summary collapse
Class Method Details
.apply?(candidate, address_comparison) ⇒ Boolean
26 27 28 29 30 31 32 |
# File 'app/countries/atlas_engine/kr/address_validation/validators/full_address/exclusions/city.rb', line 26 def apply?(candidate, address_comparison) candidate_si = extract_component_from_city(candidate, :si) candidate_gu = extract_component_from_city(candidate, :gu) (candidate_si.present? && contains_component?(:si, candidate_si, address_comparison)) || (candidate_gu.present? && contains_component?(:gu, candidate_gu, address_comparison)) end |