end
end
+ # raised when a two preferences have a duplicate key string.
+ class APIDuplicatePreferenceError < APIError
+ def initialize(key)
+ @key = key
+ end
+
+ attr_reader :key
+
+ def status
+ :bad_request
+ end
+
+ def to_s
+ "Duplicate preferences with key #{@key}"
+ end
+ end
+
# Helper methods for going to/from mercator and lat/lng.
class Mercator
include Math
country = "GB" if country == "UK"
end
end
-
+
return country.upcase
end