ash/test/support/flow/steps/count_value.ex
Zach Daniel b20c4afd9b improvement: haltable flows, branch step type
fix: fix chart links rendering
2022-10-06 17:04:44 -04:00

10 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