mobilizon/lib/service/geospatial/geospatial.ex
2019-09-26 17:45:47 +02:00

18 lines
499 B
Elixir

defmodule Mobilizon.Service.Geospatial do
@moduledoc """
Module to load the service adapter defined inside the configuration.
See `Mobilizon.Service.Geospatial.Provider`.
"""
@doc """
Returns the appropriate service adapter.
According to the config behind
`config :mobilizon, Mobilizon.Service.Geospatial,
service: Mobilizon.Service.Geospatial.Module`
"""
@spec service :: module
def service, do: get_in(Application.get_env(:mobilizon, __MODULE__), [:service])
end