ExTorch.DelegateWithDocs (extorch v0.1.0-pre0)

Public API documentation for DelegateWithDocs. This module is based on https://github.com/danielberkompas/delegate_with_docs

Link to this section Summary

Functions

Delegates a function to another module, copying its docs. Use exactly like Kernel.defdelegate/2.

Get the doc string for a given module and function.

Get the typespecs for a given function as an AST.

Link to this section Functions

Link to this macro

__using__(_)

(macro)

Overrides Kernel.defdelegate/2 with defdelegate/2.

Link to this macro

defdelegate(fun, opts)

(macro)

Delegates a function to another module, copying its docs. Use exactly like Kernel.defdelegate/2.

Link to this function

get_doc(module, arg)

@spec get_doc(
  module(),
  {atom(), integer()}
) :: {String.t() | nil, map() | :none} | nil

Get the doc string for a given module and function.

example

Example

DelegateWithDocs.get_doc(MyModule.Internal, {:my_func, 2})
Link to this function

get_specs(module, arg)

Get the typespecs for a given function as an AST.