Can you use custom attributes similar to @impl or @behaviour, but rather than using a callback function, only the function name is used (e.g. @description Mod.fun).
# A.ex
defmodule A do
use C
@description1 "function11 returns :ok"
def function1(_a) do
:ok
end
@description2 A.function1
def function2(_b) do
:ok
end
end
In the example above, the @description1 attribute is valid, since what follows is a string. Then, in @description2 fails since it tries to get a value, but instead I wish to get the name of the method (i.e. A.function1).
defmodule B do
@behaviour Bar
@callback foo
end
Some elixir modules are able to do something similar. For example, you can set modules/methods to @behaviour and @callback. Can something similar be created?
Thanks.


















