Class: AtlasEngine::AddressValidation::Es::QueryBuilder

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(address, parsings, profile) ⇒ QueryBuilder

Returns a new instance of QueryBuilder.



35
36
37
38
39
# File 'app/models/atlas_engine/address_validation/es/query_builder.rb', line 35

def initialize(address, parsings, profile)
  @address = address
  @profile = profile
  @parsings = parsings
end

Class Method Details

.for(address, parsings, locale = nil) ⇒ Object



22
23
24
25
# File 'app/models/atlas_engine/address_validation/es/query_builder.rb', line 22

def for(address, parsings, locale = nil)
  profile = CountryProfile.for(T.must(address.country_code), locale)
  profile.attributes.dig("validation", "query_builder").constantize.new(address, parsings, profile)
end

Instance Method Details

#full_address_queryObject



42
# File 'app/models/atlas_engine/address_validation/es/query_builder.rb', line 42

def full_address_query; end