Class: AtlasEngine::AddressValidation::Validators::Predicates::Zip::ValidForCountry
- Inherits:
-
ZipBase
- Object
- Predicate
- ZipBase
- AtlasEngine::AddressValidation::Validators::Predicates::Zip::ValidForCountry
- Defined in:
- app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_country.rb
Instance Attribute Summary
Attributes inherited from Predicate
#address, #cache, #field, #message_format
Instance Method Summary collapse
Methods inherited from Predicate
Constructor Details
This class inherits a constructor from AtlasEngine::AddressValidation::Validators::Predicates::Predicate
Instance Method Details
#concerning? ⇒ Boolean
16 17 18 19 20 21 22 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_country.rb', line 16 def concerning? return false unless super return false if @address.zip.blank? return false if @cache.country.valid_zip?(@address.zip) true end |
#evaluate ⇒ Object
11 12 13 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_country.rb', line 11 def evaluate build_concern if concerning? end |