View Source Dependents.Tree.Proxy (Dependents Tree v0.1.25)
Creates a Dependents.Tree
of all local apps.
Also converts a Dependents.Tree
into table maps.
Link to this section Summary
Link to this section Functions
Specs
new() :: Dependents.Tree.t()
Creates a Dependents.Tree
of all local apps.
Examples
iex> alias Dependents.Tree.Proxy
iex> tree = Proxy.new()
iex> %{log_reset: [n1 | deps1], io_ansi_table: [n2 | deps2]} = tree
iex> Enum.all?(deps1, &is_atom/1) and Enum.all?(deps2, &is_atom/1) and
...> is_integer(n1) and is_integer(n2)
true
Specs
to_maps(Dependents.Tree.t(), Dependents.Tree.ranks()) :: [ Dependents.Tree.table_map() ]
Converts a Dependents.Tree
into table maps.
Examples
iex> alias Dependents.Tree.Proxy
iex> tree = %{
...> io_ansi_table: [3, :noaa_observations, :github_issues],
...> map_sorter: [4, :io_ansi_table]
...> }
iex> ranks = %{io_ansi_table: 27, map_sorter: 25}
iex> maps = Proxy.to_maps(tree, ranks)
iex> [
...> %{
...> app: :io_ansi_table, chunk: 1,
...> dependent_1: :noaa_observations,
...> dependent_2: :github_issues,
...> dependent_3: nil,
...> dependent_4: nil,
...> dcys: 3, deps: 2, hex: "Y", rank: 27, ver: ver_27
...> },
...> %{
...> app: :map_sorter, chunk: 1,
...> dependent_1: :io_ansi_table,
...> dependent_2: nil,
...> dependent_3: nil,
...> dependent_4: nil,
...> dcys: 4, deps: 1, hex: "Y", rank: 25, ver: ver_25
...> }
...> ] = maps
iex> is_binary(ver_27) and is_binary(ver_25)
true