docs: clean up module documentation setup

This commit is contained in:
Zach Daniel 2023-09-15 09:40:28 -04:00
parent 24d2ecd554
commit c89f651596
9 changed files with 22 additions and 13 deletions

View file

@ -11,7 +11,7 @@ defmodule AshStateMachine.BuiltinChanges do
end end
@doc """ @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 def next_state, do: AshStateMachine.BuiltinChanges.NextState
end end

View file

@ -1,8 +1,5 @@
defmodule AshStateMachine.BuiltinChanges.NextState do defmodule AshStateMachine.BuiltinChanges.NextState do
@moduledoc """ @moduledoc false
Given the action and the current state, attempt to find the next state to
transition into.
"""
use Ash.Resource.Change use Ash.Resource.Change
def change(changeset, _opts, _) do def change(changeset, _opts, _) do

View file

@ -1,7 +1,5 @@
defmodule AshStateMachine.BuiltinChanges.TransitionState do defmodule AshStateMachine.BuiltinChanges.TransitionState do
@moduledoc """ @moduledoc false
Transitions the state to a new state, validating the transition.
"""
use Ash.Resource.Change use Ash.Resource.Change
def change(changeset, opts, _) do def change(changeset, opts, _) do

View file

@ -1,5 +1,6 @@
defmodule AshStateMachine.Transformers.AddState do 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 use Spark.Dsl.Transformer
alias Spark.Dsl.Transformer alias Spark.Dsl.Transformer

View file

@ -1,5 +1,6 @@
defmodule AshStateMachine.Transformers.EnsureStateSelected do 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 use Spark.Dsl.Transformer
def transform(dsl_state) do def transform(dsl_state) do

View file

@ -1,7 +1,7 @@
defmodule AshStateMachine.Transformers.FillInTransitionDefaults do defmodule AshStateMachine.Transformers.FillInTransitionDefaults do
@moduledoc false
use Spark.Dsl.Transformer use Spark.Dsl.Transformer
alias Spark.Dsl.Transformer alias Spark.Dsl.Transformer
@moduledoc false
def transform(dsl_state) do def transform(dsl_state) do
initial_states = AshStateMachine.Info.state_machine_initial_states!(dsl_state) initial_states = AshStateMachine.Info.state_machine_initial_states!(dsl_state)

View file

@ -1,5 +1,6 @@
defmodule AshStateMachine.Verifiers.VerifyDefaultInitialState do 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 use Spark.Dsl.Verifier
def verify(dsl_state) do def verify(dsl_state) do

View file

@ -1,5 +1,6 @@
defmodule AshStateMachine.Verifiers.VerifyTransitionActions do 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 use Spark.Dsl.Verifier
def verify(dsl_state) do def verify(dsl_state) do

10
mix.exs
View file

@ -115,9 +115,19 @@ defmodule AshStateMachine.MixProject do
Dsl: [ Dsl: [
AshStateMachine AshStateMachine
], ],
Introspection: [
AshStateMachine.Info,
AshStateMachine.Transition
],
Helpers: [
AshStateMachine.BuiltinChanges
],
Charts: [ Charts: [
AshStateMachine.Charts AshStateMachine.Charts
], ],
Errors: [
~r/AshStateMachine.Errors/
],
Internals: ~r/.*/ Internals: ~r/.*/
] ]
] ]