# `Spark.Igniter`
[🔗](https://github.com/ash-project/spark/blob/v2.7.8/lib/spark/igniter.ex#L6)

Helpers for patching Spark DSLs.

# `add_extension`

```elixir
@spec add_extension(Igniter.t(), module(), module(), atom(), module(), boolean()) ::
  Igniter.t()
```

Adds an extension to a DSL module.

# `find`

```elixir
@spec find(Igniter.t(), module(), (module(), Sourceror.Zipper.t() -&gt;
                               {:ok, value} | :error)) ::
  {:ok, Igniter.t(), module(), value} | {:error, Igniter.t()}
when value: term()
```

Searches for a match to a zipper function inside a DSL and all of its fragments.

# `get_option`

```elixir
@spec get_option(Igniter.t(), module(), [atom()]) ::
  {Igniter.t(), {:ok, Macro.t()} | :error}
```

Gets an option at a given path within a DSL.
We will attempt to expand literals using the environment at the path
but this is only guaranteed to return the *AST* at that option, *not* necessarily a value.

Additionally, this only finds options set explicitly in the body of the resource, not by an extension.

# `has_extension`

```elixir
@spec has_extension(Igniter.t(), module(), module(), atom(), module()) ::
  {Igniter.t(), boolean()}
```

Returns `{igniter, true}` if the module has the extension, or `{igniter, false}` otherwise.

# `prepend_to_section_order`

Prepends a new section or list of sections to the section order in a formatter configuration.

# `remove_extension`

```elixir
@spec remove_extension(Igniter.t(), module(), module(), atom(), module(), boolean()) ::
  Igniter.t()
```

Removes an extension from a DSL module.

# `set_option`

```elixir
@spec set_option(
  Igniter.t(),
  module(),
  dsl_path :: [atom()],
  value :: term(),
  (Sourceror.Zipper.t() -&gt;
     {:ok, Sourceror.Zipper.t()}
     | {:error, term() | [term()]}
     | :error)
) ::
  Igniter.t()
```

Sets an option at a given path within in a DSL.

# `update_dsl`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
