3 ms·
You can write a using macro to automatically create a behaviour from specs in a module with https://hexdocs.pm/elixir/Module.html#spec_to_callback/2 https://hex
by oxidant 3y ago
You can write a using macro to automatically create a behaviour from specs in a module with https://hexdocs.pm/elixir/Module.html#spec_to_callback/2 https://hexdocs.pm/elixir/Module.html#spec_to_callback/2
It's been a minute but I've done it.
The behaviour/implementation setup reminds me of Java, especially when they're exactly the same.
I do recommend only using mox as far down as possible (only around libraries).
Hammox is Mox on steroids, check it out too.