View Source ExPropriate.FullModule (ExPropriate v0.1.0)
This module handles expropriation of module-level granularity.
It can be set up like this:
defmodule MyModule do
use ExPropriate,
expropriate_all: true
defp my_private_function do
:has_been_expropriated
end
end
MyModule.my_private_function
# :has_been_expropriatedIt is important to note that this module has been designed to be less "intrusive" than the function-level granularity. The reason behind this decision is so that it can serve as a fallback in case there are issues with the function-level.
Also a friendly reminder that the functions and macros contained in this module are for internal use of the library and it's advised against using them directly.
Link to this section Summary
Functions
An override of Kernel.defp/2.
Generates the ast necessary to inject this module's defp/2 macro instead of Kernel.defp/2.
Link to this section Functions
An override of Kernel.defp/2.
This macro basically forwards the received args to the implicit def/2. This usually is
Kernel.def/2, but it could be some other module.
Specs
generate_use_ast() :: Macro.t()
Generates the ast necessary to inject this module's defp/2 macro instead of Kernel.defp/2.