def components(arg)
      if arg.kind_of?(Hash)
        arg = arg.sort.map { |k, v| "#{k}:#{v}" }
        return arg.join("|")
      end

      raise ArgumentError, "Expected a Hash for components, but got #{arg.class}"
    end
def components(arg)
      if arg.kind_of?(Hash)
        arg = arg.sort.map { |k, v| "#{k}:#{v}" }
        return arg.join("|")
      end

      raise ArgumentError, "Expected a Hash for components, but got #{arg.class}"
    end
Converts a dict of components to the format expected by the Google Maps
 server.

 @example
   >> GoogleMapsService::Convert.components({"country": "US", "postal_code": "94043"})
   => "country:US|postal_code:94043"

 @param [Hash] arg The component filter.

 @return [String]