Class: AtlasEngine::AddressValidation::PredicatePipeline
- Inherits:
-
FrozenRecord::Base
- Object
- FrozenRecord::Base
- AtlasEngine::AddressValidation::PredicatePipeline
show all
- Extended by:
- T::Sig
- Defined in:
- app/models/atlas_engine/address_validation/predicate_pipeline.rb
Defined Under Namespace
Modules: Backend
Classes: PredicateConfig
Constant Summary
collapse
- VALIDATION_PIPELINES_ROOT =
T.let(File.join(AtlasEngine::Engine.root, "db/data/validation_pipelines"), String)
Class Attribute Summary collapse
Instance Method Summary
collapse
Class Attribute Details
.pipeline_path ⇒ Object
32
33
34
|
# File 'app/models/atlas_engine/address_validation/predicate_pipeline.rb', line 32
def pipeline_path
@pipeline_path ||= T.let(VALIDATION_PIPELINES_ROOT, T.nilable(String))
end
|
Instance Method Details
#full_address_validator ⇒ Object
54
55
56
|
# File 'app/models/atlas_engine/address_validation/predicate_pipeline.rb', line 54
def full_address_validator
attributes.dig("full_address_validator")&.constantize
end
|
#pipeline ⇒ Object
44
45
46
47
48
49
50
51
|
# File 'app/models/atlas_engine/address_validation/predicate_pipeline.rb', line 44
def pipeline
attributes.dig("pipeline").map do |config|
PredicateConfig.new(
class_name: config["class"].constantize,
field: config["field"].to_sym,
)
end
end
|