In Elixir, is there any way to get a module to list its functions?

前端 未结 3 1848
情话喂你
情话喂你 2020-12-25 09:25

In the same way that we can get any object (or class) in Ruby to list its methods, is there any function in Elixir to list all functions belonging to a module? Something (a

3条回答
  •  一生所求
    2020-12-25 10:00

    I've been using iex(1)> exports TargetModuleName. It lists all functions and macros belonging to a module. I stumbled onto it trying to figure out how to stop Map.__info__(:functions) from truncating a long function list.

提交回复
热议问题