Class: AtlasEngine::AddressValidation::Validators::FullAddress::CandidateResult
- Inherits:
-
CandidateResultBase
- Object
- CandidateResultBase
- AtlasEngine::AddressValidation::Validators::FullAddress::CandidateResult
show all
- Extended by:
- T::Sig
- Includes:
- LogHelper
- Defined in:
- app/models/atlas_engine/address_validation/validators/full_address/candidate_result.rb
Instance Method Summary
collapse
Methods included from LogHelper
#log_error, #log_info, #log_warn
Constructor Details
#initialize(address_comparison:, matching_strategy:, result:) ⇒ CandidateResult
19
20
21
22
23
24
|
# File 'app/models/atlas_engine/address_validation/validators/full_address/candidate_result.rb', line 19
def initialize(address_comparison:, matching_strategy:, result:)
super(address: address_comparison.address, result: result)
@address_comparison = address_comparison
@candidate = address_comparison.candidate
@matching_strategy = matching_strategy
end
|
Instance Method Details
#suggestable? ⇒ Boolean
36
37
38
|
# File 'app/models/atlas_engine/address_validation/validators/full_address/candidate_result.rb', line 36
def suggestable?
ConcernBuilder.should_suggest?(address, unmatched_components.keys)
end
|
#update_result ⇒ Object
27
28
29
30
31
32
33
|
# File 'app/models/atlas_engine/address_validation/validators/full_address/candidate_result.rb', line 27
def update_result
result.candidate = candidate.serialize
return if unmatched_components_to_validate.empty?
update_concerns_and_suggestions
update_result_scope
end
|