def bounds(arg)
      if arg.kind_of?(Hash)
        southwest = arg[:southwest] || arg["southwest"]
        northeast = arg[:northeast] || arg["northeast"]
        return "#{latlng(southwest)}|#{latlng(northeast)}"
      end

      raise ArgumentError, "Expected a bounds (southwest/northeast) Hash, but got #{arg.class}"
    end
def bounds(arg)
      if arg.kind_of?(Hash)
        southwest = arg[:southwest] || arg["southwest"]
        northeast = arg[:northeast] || arg["northeast"]
        return "#{latlng(southwest)}|#{latlng(northeast)}"
      end

      raise ArgumentError, "Expected a bounds (southwest/northeast) Hash, but got #{arg.class}"
    end
Converts a lat/lon bounds to a comma- and pipe-separated string.

 Accepts two representations:

 1. String: pipe-separated pair of comma-separated lat/lon pairs.
 2. Hash with two entries - "southwest" and "northeast". See {.latlng}
 for information on how these can be represented.

 For example:

   >> sydney_bounds = {
   ?>   "northeast": {
   ?>     "lat": -33.4245981,
   ?>     "lng": 151.3426361
   ?>   },
   ?>   "southwest": {
   ?>     "lat": -34.1692489,
   ?>     "lng": 150.502229
   ?>   }
   ?> }
   >> GoogleMapsService::Convert.bounds(sydney_bounds)
   => '-34.169249,150.502229|-33.424598,151.342636'

 @param [Hash] arg The bounds.

 @return [String]