edoc_lib — edoc v1.3

Search documentation of edoc

# View Source edoc_lib (edoc v1.3)

Utility functions for EDoc.

See also: edoc.

# Summary

## Types

err/0
filename/0
line/0
proplist/0

## Functions

get_doc_env(App, Modules, Options)

Creates an environment data structure used by parts of EDoc for generating references, etc. See `edoc:run/2` for a description of the options `file_suffix`, `app_default` and `doc_path`.

infer_module_app(Mod)

Infer application containing the given module.

write_file(Text, Dir, Name, Options)

# Types

Link to this type

# err/0

View Source

    -type err() :: eof | {missing, char()} | {line(), atom(), string()} | string().

Link to this type

# filename/0

View Source

    -type filename() :: file:filename().

Link to this type

# line/0

View Source

    -type line() :: erl_anno:line().

Link to this type

# proplist/0

View Source

    -type proplist() :: proplists:proplist().

# Functions

Link to this function

# get_doc_env(App, Modules, Options)

View Source

    -spec get_doc_env(App, Modules, Options) -> edoc:env()
                         when App :: atom() | no_app, Modules :: [module()], Options :: proplist().

Creates an environment data structure used by parts of EDoc for generating references, etc. See `edoc:run/2` for a description of the options `file_suffix`, `app_default` and `doc_path`.

See also: edoc:get_doc/3, edoc_extract:source/4.

Link to this function

# infer_module_app(Mod)

View Source

    -spec infer_module_app(module()) -> no_app | {app, atom()}.

Infer application containing the given module.

It's expected that modules which are not preloaded and don't match the `<app>/ebin/<mod>.beam` path pattern will NOT have an app name inferred properly. `no_app` is returned in such cases.

Link to this function

# write_file(Text, Dir, Name, Options)

View Source