Injectanator v0.0.1 Injectanator.Registry

The key value registry used to store modules.

This works by storing modules inside of a map. They are key’d by their module name, and the value is their module name.

For instance, if we have injected the module A.B, the state of the registry would be %{A.B: A.B}.

If at anytime the A.B module is overwitten with A.B.C, the state will be %{A.B: A.B.C}

Summary

Functions

Retrieves the desired module from the store. If it have not be stored before, it is stored, and then returned

Sets the provided module (key) to the provided module (value)

Start’s the registry with the modules name

Functions

get(module)
get(Module) :: Module

Retrieves the desired module from the store. If it have not be stored before, it is stored, and then returned.

## Examples

iex> Injectanator.Registry.get(A.B)
A.B
set(module, value)
set(Module, Module) :: :ok

Sets the provided module (key) to the provided module (value)

## Examples

iex> Injectanator.Registry.set(A.B, A.B.C)
:ok
start_link()
start_link() :: {:ok, pid}

Start’s the registry with the modules name