Class: AtlasEngine::AddressValidation::Validators::Predicates::Predicate
- Inherits:
-
Object
- Object
- AtlasEngine::AddressValidation::Validators::Predicates::Predicate
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- app/models/atlas_engine/address_validation/validators/predicates/predicate.rb
Direct Known Subclasses
City::Present, Country::Exists, Country::ValidForZip, Neighborhood::Present, NoEmojis, NoHtmlTags, NoUrl, NotExceedMaxLength, NotExceedMaxTokenCount, AtlasEngine::AddressValidation::Validators::Predicates::Phone::Valid, AtlasEngine::AddressValidation::Validators::Predicates::Province::Exists, AtlasEngine::AddressValidation::Validators::Predicates::Province::ValidForCountry, Street::BuildingNumberInAddress1, Street::BuildingNumberInAddress1OrAddress2, Street::Present, StreetName::Present, StreetNumber::Present, Zip::ZipBase
Instance Attribute Summary collapse
-
#address ⇒ Object
readonly
Returns the value of attribute address.
-
#cache ⇒ Object
readonly
Returns the value of attribute cache.
-
#field ⇒ Object
readonly
Returns the value of attribute field.
-
#message_format ⇒ Object
readonly
Returns the value of attribute message_format.
Instance Method Summary collapse
- #evaluate ⇒ Object
-
#initialize(field:, address:, message_format: MessageFormat::Instructional, cache: Cache.new(address)) ⇒ Predicate
constructor
A new instance of Predicate.
Constructor Details
#initialize(field:, address:, message_format: MessageFormat::Instructional, cache: Cache.new(address)) ⇒ Predicate
Returns a new instance of Predicate.
28 29 30 31 32 33 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/predicate.rb', line 28 def initialize(field:, address:, message_format: MessageFormat::Instructional, cache: Cache.new(address)) @field = field @address = address @cache = cache @message_format = end |
Instance Attribute Details
#address ⇒ Object (readonly)
Returns the value of attribute address.
17 18 19 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/predicate.rb', line 17 def address @address end |
#cache ⇒ Object (readonly)
Returns the value of attribute cache.
20 21 22 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/predicate.rb', line 20 def cache @cache end |
#field ⇒ Object (readonly)
Returns the value of attribute field.
14 15 16 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/predicate.rb', line 14 def field @field end |
#message_format ⇒ Object (readonly)
Returns the value of attribute message_format.
23 24 25 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/predicate.rb', line 23 def @message_format end |
Instance Method Details
#evaluate ⇒ Object
36 |
# File 'app/models/atlas_engine/address_validation/validators/predicates/predicate.rb', line 36 def evaluate; end |