19
20
21
22
23
24
25
26
27
28
29
|
# File 'app/countries/atlas_engine/pt/address_validation/validators/full_address/exclusions/zip.rb', line 19
def apply?(candidate, address_comparison)
street_comparison_result = address_comparison.street_comparison.sequence_comparison
building_comparison_result = address_comparison.building_comparison.sequence_comparison
return true if street_comparison_result.nil? ||
building_comparison_result.nil? ||
T.must(building_comparison_result).candidate_ranges.empty?
!T.must(street_comparison_result).match? ||
!T.must(building_comparison_result).match?
end
|