Ecbolic v0.2.4 Ecbolic.Pretty View Source

This module provides small formating for when you want to display your docs.

All functions intended for formating can be supplied with a string, which allows you to use function names, help and such. The default format is ":f - :h

  • :f

Inserts the name function of the function

  • :h

Inserts the documentation for the function

  • :a

Aligns all documentations up to this point. This only works with functions that format multiple functions.

Example output

Ecbolic.Pretty.format([:hello, :long_function_name], ":f:a - :h")
#=> 
"hello              - returns `world`",
"long_function_name - Long description"

Link to this section Summary

Functions

Formats a single or multiple given functions

Formats all functions according to the given format

Formats all functions according to the given format, but clustered by their group

Formats all functions that belong to the given group

Link to this section Functions

Link to this function format(list, format \\ ":f - :h") View Source

Formats a single or multiple given functions

Link to this function format_all(format \\ ":f - :h") View Source
format_all(String.t()) :: String.t()

Formats all functions according to the given format

Link to this function format_all_groups(format \\ ":f - :h") View Source
format_all_groups(String.t()) :: %{
  optional(Ecbolic.atom_or_string()) => String.t()
}

Formats all functions according to the given format, but clustered by their group.

Link to this function format_group(group, format \\ ":f - :h") View Source
format_group(Ecbolic.atom_or_string(), String.t()) :: String.t()

Formats all functions that belong to the given group