View Source Prototype (Prototype v0.8.0-alpha)
Documentation for Prototype
.
Summary
Functions
Calls functions by searching up a prototype chain of modules, calling it on the first module where it is found.
Finds all matching functions up the prototype chain and returns them as a list.
Returns whether the given module exports the given function.
Returns the prototype module for a given module, if one exists.
Recursively builds a list of all modules in the prototype chain. Works for both modules and structs.
Functions
@spec apply(module() | struct(), atom(), list()) :: {:ok, atom(), map()} | {:missing_fun, atom(), list(), map()}
Calls functions by searching up a prototype chain of modules, calling it on the first module where it is found.
Finds all matching functions up the prototype chain and returns them as a list.
(Note that a function of the correct arity may be exported by a module,
but a FunctionClauseError
would still be raised if there is not a matching
function clause in that module. However, a matching clause may be found up
further the prototype chain.)
Returns whether the given module exports the given function.
Returns the prototype module for a given module, if one exists.
Recursively builds a list of all modules in the prototype chain. Works for both modules and structs.