ExExport (ex_export v0.3.3)
This module inspects another module for public functions and generates the defdelegate needed to add them to the local modules name space
Link to this section Summary
Functions
require in the module and them call export for each module you want to import. ## Examples defmodule Sample do
Link to this section Functions
require in the module and them call export for each module you want to import. ## Examples defmodule Sample do
require ExExport
alias Sample.Actions.Greet
ExExport.export(Greet)
ExExport.export(Sample.Actions.Farewell)
end
Options
:only
- (since v0.2.0) a list of [function: arity] only matching functions will be delegated:exclude
- (since v0.2.0) a list of [function: arity] matching functions will NOT be delegated:delegate
- (since v0.3.0) true/false default true - true means that it will use defdelegate - false it builds a local function and maps it manually.
## See the Output
In the configuration file for the environment you wish to render the
data attributes, you can set the show_definitions
to true. This
will output the code that is being injected in a readable form. This can be useful
if you get warnings like (Cannot match because already defined)
config :ex_export, :show_definitions, true
Link to this function
output_definition(msg)
Link to this function