Hello friends,
I’m curious how to call functions in moduledocs when generating documentation.
Given the following module, how do I use my provided functions for formatting?
defmodule ModuleDocFormatterQuestion do
@moduledoc """
| name | type | default | description |
#{render_env_var_in_md_table("First column", "second_column", "third_column", "fourth column")}
"""
defp render_env_var_in_table(name, type, default, description) do
"| `#{name}` | `#{type}` | `#{default}` | #{description} |"
end
end
thanks a bunch!