Class: AtlasEngine::AddressValidation::Validators::Predicates::Zip::ZipBase

Inherits:
Predicate
  • Object
show all
Defined in:
app/models/atlas_engine/address_validation/validators/predicates/zip/zip_base.rb

Direct Known Subclasses

Present, ValidForCountry, ValidForProvince

Instance Attribute Summary

Attributes inherited from Predicate

#address, #cache, #field, #message_format

Instance Method Summary collapse

Methods inherited from Predicate

#evaluate, #initialize

Constructor Details

This class inherits a constructor from AtlasEngine::AddressValidation::Validators::Predicates::Predicate

Instance Method Details

#concerning?Boolean

Returns:

  • (Boolean)


13
14
15
16
17
18
# File 'app/models/atlas_engine/address_validation/validators/predicates/zip/zip_base.rb', line 13

def concerning?
  return false unless @cache.country.has_zip?
  return false unless @cache.country.zip_required?

  true
end