Skip to content

Latest commit

History

21 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Small library to make dependency injection with elixir easier, see documentation for more infos

Build

Build Status

Documentation

https://hexdocs.pm/inxect

Hex

Hex.pmHex.pm

Example

defmoduleLocalizerdo@callbackgetHello::String.tenddefmoduleGreeterdouseInxect.DIinject:localizer@specsayHello(String.t)::{:ok,String.t}defisayHello(who,localizer)do{:ok,"#{localizer.getHello()}#{who}"}endenddefmoduleEnglishLocalizerdo@behaviourLocalizer@specgetHello::String.tdefgetHellodohelloendenddefmoduleRegistrydouseInxect.Registryregister{:localizer,EnglishLocalizer}end
iex(2)>Greeter.sayHello("Daniel"){:ok,"hello Daniel"}

About

dependency injection for elixir

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages