multiverses v0.5.0 Multiverses.MacroClone View Source
allows a module to directly clone all of the public functions of a given module, except as macros.
thus multiverse equivalents replicate the functionality of the parent
module, except with the equivalents substituted at compile time,
allowing multiverse apps to exist as [runtime: false]
apps.
Usage
In the following example, FooModule
has all of its functions ported
into the current module, except as macros. The functions FooModule.foo/3
and FooModule.foo/4
are not, but rather should be ported using defclone/2
use Multiverses.MacroClone, with: FooModule, except: [
foo: 3,
foo: 4
]
Link to this section Summary
Functions
clones the target function from the parent module (as defined in the use
statement)
as a macro, unless use Multiverses
has been activated.
Link to this section Functions
clones the target function from the parent module (as defined in the use
statement)
as a macro, unless use Multiverses
has been activated.
In the case that use Multiverses
has been activated, the macro takes the value of the
contents inside the defclone
block.