Packages

provides a simplified state machine implementation and DSL

Current section

Files

Jump to
statex lib statex helpers property.ex
Raw

lib/statex/helpers/property.ex

defmodule Statex.Helpers.Property do
@moduledoc false
@spec functions :: Statex.Helpers.helperfn
def functions do
quote do
alias Statex.Helpers
@spec states::list(atom)
@doc """
retrieves a list of all of the states in the state graph of `#{Helpers.pretty(__MODULE__)}`
"""
def states, do: state_graph() |> StateGraph.states()
@spec transitions()::list(atom())
@doc """
retrieves a list of all of the transitions in the state graph of `#{Helpers.pretty(__MODULE__)}`
"""
def transitions, do: state_graph() |> StateGraph.transitions()
@spec terminal_states()::list(atom())
@doc """
retrieves a list of all of the terminal states in the state graph of `#{Helpers.pretty(__MODULE__)}`
"""
def terminal_states, do: state_graph() |> StateGraph.terminal_states()
end
end
end