Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 49e4bcd

Browse files
author
José Valim
committed
Merge pull request elixir-lang#147 from KeeperPat/edit/clarify-sentence-on-documentation-of-private-methods
Clarify that private functions cannot be documented
2 parents cb23e39 + 3c21f08 commit 49e4bcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

getting_started/6.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ iex> MyModule.__info__(:moduledoc)
8888
{1,"It does X"}
8989
```
9090

91-
`__info__(:docs)` returns a list of tuples where each tuple contains a function/arity pair, the line the function was defined on, the kind of the function (`def` or `defmacro`, private functions cannot be documented), the function arguments and its documentation. The comment will be either a binary or `nil` (not given) or `false` (explicit no doc).
91+
`__info__(:docs)` returns a list of tuples where each tuple contains a function/arity pair, the line the function was defined on, the kind of the function (either `def` or `defmacro`, private functions defined with `defp` or `defmacrop` cannot be documented), the function arguments and its documentation. The comment will be either a binary or `nil` (not given) or `false` (explicit no doc).
9292

9393
Similarly, `__info__(:moduledoc)` returns a tuple with the line the module was defined on and its documentation.
9494

0 commit comments

Comments
 (0)