Skip to content
Snippets Groups Projects
Commit 16e2d20d authored by Guillaume Dott's avatar Guillaume Dott
Browse files

Store service arrays in instance variable

It makes it easier to add a custom lookup class or filter available
services by manipulating the correct service array.
parent 8dcf1b87
No related branches found
No related tags found
No related merge requests found
......@@ -20,7 +20,7 @@ module Geocoder
# All street address lookup services, default first.
#
def street_services
[
@street_services ||= [
:dstk,
:esri,
:google,
......@@ -49,7 +49,7 @@ module Geocoder
# All IP address lookup services, default first.
#
def ip_services
[
@ip_services ||= [
:baidu_ip,
:freegeoip,
:geoip2,
......@@ -60,6 +60,8 @@ module Geocoder
]
end
attr_writer :street_services, :ip_services
##
# Retrieve a Lookup object from the store.
# Use this instead of Geocoder::Lookup::X.new to get an
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment