mirror of
https://github.com/ash-project/ash.git
synced 2024-09-21 14:03:04 +12:00
11 lines
232 B
Elixir
11 lines
232 B
Elixir
|
defmodule Ash.Test.Flow.Steps.CountValue do
|
||
|
@moduledoc false
|
||
|
use Ash.Flow.Step
|
||
|
|
||
|
def run(input, opts, _context) do
|
||
|
field = opts[:field] || :value
|
||
|
|
||
|
{:ok, input |> Map.get(field) |> List.wrap() |> Enum.count()}
|
||
|
end
|
||
|
end
|