NLdoc.Test.DocumentGenerator (NLdoc.Spec v3.1.1)

View Source

TODO: Write module documentation

TODO: determine what opts can be given.

Summary

Functions

Recursively count the number of objects in a document, or under a given spec object. The count includes the object itself and all its children.

Functions

count_objects(element)

@spec count_objects(NLdoc.Spec.object() | map()) :: integer()

Recursively count the number of objects in a document, or under a given spec object. The count includes the object itself and all its children.

The given argument is ideally an NLdoc.Spec.object(), but can also be a map, as long as its structure is similar to the NLdoc.Spec.object() structure, particularly regarding the children.

generate(opts \\ [])

@spec generate(Keyword.t()) :: NLdoc.Spec.Document.t()

generate_json(opts \\ [])

@spec generate_json(Keyword.t()) :: String.t()

generate_map(opts \\ [])

@spec generate_map(Keyword.t()) :: map()