BB.Jido.Igniter (bb_jido v0.1.2)

Copy Markdown View Source

Helpers for bb_jido's Igniter installer and generator tasks.

Only available when :igniter is loaded.

Summary

Functions

Returns the agent module to operate on.

Returns the Jido instance module to operate on.

Functions

agent_module(igniter, robot_module \\ nil)

@spec agent_module(Igniter.t(), module() | nil) :: module()

Returns the agent module to operate on.

Resolution order:

  1. The --agent option from igniter.args.options (parsed module name).
  2. {robot_module}.Agent if a robot module is supplied.
  3. {AppPrefix}.Agent as the last-resort default.

Add agent: :string to your task's schema to support the flag.

jido_instance_module(igniter)

@spec jido_instance_module(Igniter.t()) :: module()

Returns the Jido instance module to operate on.

Resolution order:

  1. The --jido-instance option from igniter.args.options (parsed module name).
  2. {AppPrefix}.Jido (e.g. MyApp.Jido).

Add jido_instance: :string to your task's schema to support the flag.