Class: AtlasEngine::Gb::AddressValidation::Es::QueryBuilder
- Inherits:
-
AddressValidation::Es::QueryBuilder
- Object
- AddressValidation::Es::QueryBuilder
- AtlasEngine::Gb::AddressValidation::Es::QueryBuilder
- Extended by:
- T::Sig
- Defined in:
- app/countries/atlas_engine/gb/address_validation/es/query_builder.rb
Instance Method Summary collapse
- #full_address_query ⇒ Object
-
#initialize(address, parsings, profile) ⇒ QueryBuilder
constructor
A new instance of QueryBuilder.
Methods inherited from AddressValidation::Es::QueryBuilder
Constructor Details
#initialize(address, parsings, profile) ⇒ QueryBuilder
Returns a new instance of QueryBuilder.
18 19 20 21 22 23 24 25 26 |
# File 'app/countries/atlas_engine/gb/address_validation/es/query_builder.rb', line 18 def initialize(address, parsings, profile) super @parsings = T.let( AtlasEngine::Gb::ValidationTranscriber::FullAddressParser .new(address: address).parse, T::Array[ValidationTranscriber::ParsedAddress], ) end |
Instance Method Details
#full_address_query ⇒ Object
29 30 31 32 33 34 35 36 37 |
# File 'app/countries/atlas_engine/gb/address_validation/es/query_builder.rb', line 29 def full_address_query { "query" => { "dis_max" => { "queries" => @parsings.map { |parsing| query_for_parsing(parsing) }, }, }, } end |