mirror of
https://github.com/ash-project/ash_state_machine.git
synced 2024-09-20 05:13:26 +12:00
docs: clean up module documentation setup
This commit is contained in:
parent
24d2ecd554
commit
c89f651596
9 changed files with 22 additions and 13 deletions
|
@ -11,7 +11,7 @@ defmodule AshStateMachine.BuiltinChanges do
|
|||
end
|
||||
|
||||
@doc """
|
||||
Try and transition to the next state.
|
||||
Try and transition to the next state. Must be only one possible next state.
|
||||
"""
|
||||
def next_state, do: AshStateMachine.BuiltinChanges.NextState
|
||||
end
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
defmodule AshStateMachine.BuiltinChanges.NextState do
|
||||
@moduledoc """
|
||||
Given the action and the current state, attempt to find the next state to
|
||||
transition into.
|
||||
"""
|
||||
@moduledoc false
|
||||
use Ash.Resource.Change
|
||||
|
||||
def change(changeset, _opts, _) do
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
defmodule AshStateMachine.BuiltinChanges.TransitionState do
|
||||
@moduledoc """
|
||||
Transitions the state to a new state, validating the transition.
|
||||
"""
|
||||
@moduledoc false
|
||||
use Ash.Resource.Change
|
||||
|
||||
def change(changeset, opts, _) do
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
defmodule AshStateMachine.Transformers.AddState do
|
||||
@moduledoc "Adds or enforces details about the state attribute"
|
||||
# Adds or enforces details about the state attribute
|
||||
@moduledoc false
|
||||
use Spark.Dsl.Transformer
|
||||
alias Spark.Dsl.Transformer
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
defmodule AshStateMachine.Transformers.EnsureStateSelected do
|
||||
@moduledoc "Ensures that `state` is always selected on queries."
|
||||
#Ensures that `state` is always selected on queries.
|
||||
@moduledoc false
|
||||
use Spark.Dsl.Transformer
|
||||
|
||||
def transform(dsl_state) do
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
defmodule AshStateMachine.Transformers.FillInTransitionDefaults do
|
||||
@moduledoc false
|
||||
use Spark.Dsl.Transformer
|
||||
alias Spark.Dsl.Transformer
|
||||
@moduledoc false
|
||||
|
||||
def transform(dsl_state) do
|
||||
initial_states = AshStateMachine.Info.state_machine_initial_states!(dsl_state)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
defmodule AshStateMachine.Verifiers.VerifyDefaultInitialState do
|
||||
@moduledoc "Verifies the default initial state is in the list of initial states."
|
||||
#Verifies the default initial state is in the list of initial states.
|
||||
@moduledoc false
|
||||
use Spark.Dsl.Verifier
|
||||
|
||||
def verify(dsl_state) do
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
defmodule AshStateMachine.Verifiers.VerifyTransitionActions do
|
||||
@moduledoc "Verifies that each transition corresponds to an update action"
|
||||
# Verifies that each transition corresponds to an update action
|
||||
@moduledoc false
|
||||
use Spark.Dsl.Verifier
|
||||
|
||||
def verify(dsl_state) do
|
||||
|
|
10
mix.exs
10
mix.exs
|
@ -115,9 +115,19 @@ defmodule AshStateMachine.MixProject do
|
|||
Dsl: [
|
||||
AshStateMachine
|
||||
],
|
||||
Introspection: [
|
||||
AshStateMachine.Info,
|
||||
AshStateMachine.Transition
|
||||
],
|
||||
Helpers: [
|
||||
AshStateMachine.BuiltinChanges
|
||||
],
|
||||
Charts: [
|
||||
AshStateMachine.Charts
|
||||
],
|
||||
Errors: [
|
||||
~r/AshStateMachine.Errors/
|
||||
],
|
||||
Internals: ~r/.*/
|
||||
]
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue