DefaultArgs
Simple check for function defaults.
How To Use
Make sure you use, require or import DefaultArgs. Wrap the module argument you want to check with the default macro. If the module cannot be loaded, then an ArgumentError is raised.
defmodule Foo do
def bar(http_client // default(MyHttpClient)) do
# work
end
end
Installation
If available in Hex, the package can be installed as:
- Add
default_argsto your list of dependencies inmix.exs:
```elixir
def deps do
[{:default_args, "~> 0.1.0"}]
end
```