Croma.Defpt (croma v0.11.1) View Source
Module that provides Croma.Defpt.defpt/2 macro.
Link to this section Summary
Functions
Defines a unit-testable private function.
When Mix.env() == :test, defpt defines a public function and thus it can be freely called from tests.
Otherwise functions defined by defpt become private.
Usage of this macro is exactly the same as the standard def and defp macros.
Link to this section Functions
Defines a unit-testable private function.
When Mix.env() == :test, defpt defines a public function and thus it can be freely called from tests.
Otherwise functions defined by defpt become private.
Usage of this macro is exactly the same as the standard def and defp macros.
Example
use Croma
defmodule M do
defpt f(x) do
IO.inspect(x)
end
end