View Source Multiverses.Clone (multiverses v0.11.0)

allows a module to directly clone all of the public functions of a given module, except as delegations.

thus multiverse equivalents replicate the functionality of the parent module. Consider dropping a cloned module into a test/support directory so that it can exist as compile-time for test, but not for dev or prod.

usage

Usage

In the following example, FooModule has all of its functions ported into the current module as defdelegate/2. The functions FooModule.foo/3 and FooModule.foo/4 are not, but rather should be manually implemented (if used)

use Multiverses.Clone, with: FooModule, except: [
  foo: 3,
  foo: 4
]