View Source Doctor.ModuleInformation (Doctor v0.21.0)

This module defines a struct which houses all the documentation data for an entire module.

Link to this section Summary

Functions

Breaks down the docs format entry returned from Code.fetch_docs(MODULE)

Checks the provided module for a struct function which is injected into the module whenever you use defstruct

Given the provided module, read the file from which the module was generated and convert the file to an AST.

Given a ModuleInformation struct with the AST loaded, fetch all of the author defined functions

Link to this section Types

@type t() :: %Doctor.ModuleInformation{
  behaviours: [module()],
  docs: [%Doctor.Docs{arity: term(), doc: term(), kind: term(), name: term()}],
  docs_version: atom(),
  file_ast: list(),
  file_full_path: String.t(),
  file_relative_path: String.t(),
  metadata: map(),
  module: module(),
  module_doc: map(),
  properties: Keyword.t(),
  specs: list(),
  struct_type_spec: atom() | boolean(),
  user_defined_functions: [{atom(), integer(), atom() | boolean()}]
}

Link to this section Functions

Breaks down the docs format entry returned from Code.fetch_docs(MODULE)

Link to this function

contains_struct_type_spec?(module)

View Source

Checks the provided module for a struct function which is injected into the module whenever you use defstruct

Link to this function

load_file_ast(module_info)

View Source

Given the provided module, read the file from which the module was generated and convert the file to an AST.

Link to this function

load_user_defined_functions(module_info)

View Source

Given a ModuleInformation struct with the AST loaded, fetch all of the author defined functions