fsmx v0.1.0 Fsmx.Struct View Source

Main module to include finite-state machine logic into your struct/schema

It assumes a :state string field exists in your model

Basic usage:

defmodule MyApp.Struct do
  defstruct [:state]

  use Fsmx.Struct, transitions: %{}
end