defmodule URI.Parser do
  @moduledoc """
  Defines the behavior for each URI.Parser.
  Check URI.HTTP for a possible implementation.
  """

  use Behaviour

  @doc """
  Responsible for parsing extra URL information.
  """
  defcallback parse(uri_info)

  @doc """
  Responsible for returning the default port.
  """
  defcallback default_port()
end

defmodule URI.Parser do
  @moduledoc """
  Defines the behavior for each URI.Parser.
  Check URI.HTTP for a possible implementation.
  """

  use Behaviour

  @doc """
  Responsible for parsing extra URL information.
  """
  defcallback parse(uri_info :: URI.Info.t), do: URI.Info.t

  @doc """
  Responsible for returning the default port.
  """
  defcallback default_port(), do: integer
end

Use new callbacks in URI.Parser
Use new callbacks in URI.Parser

kelvinst/elixir,joshprice/elixir,gfvcastro/elixir,kimshrier/elixir,ggcampinho/elixir,lexmag/elixir,antipax/elixir,antipax/elixir,beedub/elixir,kelvinst/elixir,lexmag/elixir,beedub/elixir,ggcampinho/elixir,elixir-lang/elixir,pedrosnk/elixir,michalmuskala/elixir,gfvcastro/elixir,kimshrier/elixir,pedrosnk/elixir