Patch.Mock.Values.Callable (patch v0.10.1) View Source

Link to this section Summary

Link to this section Types

Specs

dispatch_mode() :: :apply | :list

Specs

dispatch_option() :: {:dispatch, dispatch_mode()}

Specs

evaluate_mode() :: :passthrough | :strict

Specs

evaluate_option() :: {:evaluate, evaluate_mode()}

Specs

option() :: dispatch_option() | evaluate_option()

Specs

t() :: %Patch.Mock.Values.Callable{
  dispatch: dispatch_mode(),
  evaluate: evaluate_mode(),
  target: function()
}

Link to this section Functions

Specs

advance(callable :: t()) :: t()
Link to this function

new(target, options \\ [])

View Source

Specs

new(target :: function(), options :: [option()]) :: t()
Link to this function

next(callable, arguments)

View Source

Specs

next(callable :: t(), arguments :: [term()]) :: {:ok, t(), term()} | :error