You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
`Machinist` is a small library that allows you to implement finite state machines with Elixir in a simple way. It provides a simple DSL to write combinations of transitions based on events.
## Installation
You can install `machinist` by adding it to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:machinist, "~> 0.2.0"}
]
end
```
## Usage
A good example is how we would implement the behaviour of a door. With `machinist` would be this way: