Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
norbajunior committed Apr 2, 2021
1 parent 52618fd commit d97a864
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ def transit(%Door{state: :locked} = struct, event: "unlock") do
{:ok, %Door{struct | state: :locked}}
end
```
_The functions `transit/2` implements the behaviour_ [`Machinist.Transition`](https://github.com/norbajunior/machinist/blob/main/lib/machinist/transition.ex#L2)

So that we can transit between states by relying on the **state** + **event** pattern matching.

Expand Down

0 comments on commit d97a864

Please sign in to comment.