demarches-normaliennes/app/lib/api_adresse/address_adapter.rb

18 lines
280 B
Ruby
Raw Normal View History

2018-10-15 23:21:22 +02:00
class ApiAdresse::AddressAdapter < ApiAdresse::Adapter
2018-10-15 17:26:06 +02:00
def initialize(address)
2018-10-15 23:21:22 +02:00
super(address, 5, [])
2018-10-15 17:26:06 +02:00
end
2018-10-15 16:33:42 +02:00
def get_suggestions
2018-10-15 23:21:22 +02:00
handle_result
2018-10-15 17:26:06 +02:00
end
2018-10-15 16:33:42 +02:00
2018-10-15 17:26:06 +02:00
private
2018-10-15 16:33:42 +02:00
2018-10-15 23:21:22 +02:00
def process_features
features.map do |feature|
2018-10-15 17:26:06 +02:00
feature['properties']['label']
2018-10-15 16:33:42 +02:00
end
end
end