# `Jidoka.Runtime.LocalOperations`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/runtime/local_operations.ex#L1)

Runtime support for executing local Elixir functions as Jidoka operations.

This is the current supported helper for deterministic tool tests, examples,
and simple in-process operations. Production tool authoring should normally
use `Jidoka.Action`, which is backed by `Jido.Action`.

# `handler`

```elixir
@type handler() ::
  (map(), Jidoka.Context.t() -&gt; term())
  | (Jidoka.Effect.Intent.t(), Jidoka.Effect.Journal.t(), Jidoka.Context.t() -&gt;
       term())
```

# `operations`

```elixir
@spec operations(%{required(String.t() | atom()) =&gt; handler()}) ::
  Jidoka.Operation.Capability.t()
```

Builds an operation function from a map of operation handlers.

    operations =
      Jidoka.Runtime.LocalOperations.operations(%{
        "local_time" => fn %{"city" => city}, _ctx -> {:ok, %{city: city, time: "09:30"}} end
      })

---

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