Skip to content

Commit

Permalink
Reference keyword options in documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Egidijus Z committed Aug 20, 2022
1 parent 64e54b0 commit 6c96dd3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,21 @@ Let’s define the FSM instance

```elixir
defmodule MyFSM do
@fsm """
@plantuml """
[*] --> s1 : to_s1
s1 --> s2 : to_s2
s1 --> s3 : to_s3
s2 --> [*] : ok
s3 --> [*] : ok
"""

use Finitomata, @fsm
use Finitomata, fsm: @plantuml, syntax: Finitomata.PlantUML
## or uncomment lines below for Mermaid syntax
# @mermaid """
# s1 --> |to_s2| s2
# s1 --> |to_s3| s3
# """
# use Finitomata, fsm: @mermaid, syntax: Finitomata.Mermaid

def on_transition(:s1, :to_s2, event_payload, state_payload),
do: {:ok, :s2, state_payload}
Expand Down

0 comments on commit 6c96dd3

Please sign in to comment.