Class: AtlasEngine::AddressValidation::Validators::Predicates::Predicate

Inherits:
Object
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
app/models/atlas_engine/address_validation/validators/predicates/predicate.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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 = message_format
end

Instance Attribute Details

#addressObject (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

#cacheObject (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

#fieldObject (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_formatObject (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
  @message_format
end

Instance Method Details

#evaluateObject



36
# File 'app/models/atlas_engine/address_validation/validators/predicates/predicate.rb', line 36

def evaluate; end