Current section
Files
Jump to
Current section
Files
lib/docs.ex
defmodule Doctor.Docs do
@moduledoc """
This module defines a struct which houses all the
documentation data for module functions.
"""
alias __MODULE__
@type t :: %Docs{
kind: atom(),
name: atom(),
arity: integer(),
doc: map()
}
defstruct ~w(kind name arity doc)a
@doc """
Build the Docs struct from the results of Code.fetch_docs/0
"""
def build({{kind, name, arity}, _annotation, _signature, doc, _metadata}) do
%Docs{
kind: kind,
name: name,
arity: arity,
doc: doc
}
end
end