Class: AtlasEngine::AddressImporter::Validation::FieldValidations::Zip
- Inherits:
-
Object
- Object
- AtlasEngine::AddressImporter::Validation::FieldValidations::Zip
- Extended by:
- T::Helpers, T::Sig
- Includes:
- Interface
- Defined in:
- app/models/atlas_engine/address_importer/validation/field_validations/zip.rb
Instance Attribute Summary collapse
-
#errors ⇒ Object
readonly
Returns the value of attribute errors.
Instance Method Summary collapse
-
#initialize(address:, allow_partial_zip: false) ⇒ Zip
constructor
A new instance of Zip.
- #validation_errors ⇒ Object
Constructor Details
#initialize(address:, allow_partial_zip: false) ⇒ Zip
Returns a new instance of Zip.
21 22 23 24 25 26 27 |
# File 'app/models/atlas_engine/address_importer/validation/field_validations/zip.rb', line 21 def initialize(address:, allow_partial_zip: false) @country_code = address.country_code @province_code = address.province_code @zip = address.zip @allow_partial_zip = allow_partial_zip @errors = [] end |
Instance Attribute Details
#errors ⇒ Object (readonly)
Returns the value of attribute errors.
13 14 15 |
# File 'app/models/atlas_engine/address_importer/validation/field_validations/zip.rb', line 13 def errors @errors end |
Instance Method Details
#validation_errors ⇒ Object
30 31 32 33 |
# File 'app/models/atlas_engine/address_importer/validation/field_validations/zip.rb', line 30 def validation_errors validate errors end |