GitHooks.Tasks.MFA (git_hooks v0.8.1)
View SourceRepresents a {module, function, arity} (a.k.a. mfa) that will be evaluated
by the Kernel module.
An mfa should be configured as {module, function}. The function of
the module will always receive the hook arguments as a list of argument and the arity is
expected to always be 1.
See Elixir documentation for more information.
For example:
config :git_hooks,
hooks: [
pre_commit: [
{MyModule, :my_function}
]
]
Summary
Functions
new(arg, git_hook_type, git_hook_args)
deprecated
Creates a new mfa struct.
Types
Functions
This function is deprecated. Use mfa without arity, all functions are expected to have arity 1 and receive a list with the git hook args.
Creates a new mfa struct.
Examples
iex> Elixir.GitHooks.Tasks.MFA.new({MyModule, :my_function}, :pre_commit, ["commit message"])
%Elixir.GitHooks.Tasks.MFA{module: MyModule, function: :my_function, args: ["commit message"]}