class Geocoder::Lookup::MaxmindGeoip2
def configured_service!
Return the name of the configured service, or raise an exception.
#
def configured_service! if s = configuration[:service] and services.include?(s) and configuration[:basic_auth][:user] and configuration[:basic_auth][:password] return s else raise( Geocoder::ConfigurationError, "When using MaxMind GeoIP2 you MUST specify a service name and basic_auth: " + "Geocoder.configure(:maxmind_geoip2 => {:service => ...}, " + ":basic_auth => {:user ..., :password => ...}), " + "where service is one of: #{services.inspect}" ) end end