Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
norbajunior committed Jul 20, 2022
1 parent 9a33567 commit 24e528c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ iex> Door.transit(door_opened, event: "lock")

## Guard conditions

We also could be implementing a state machine for an eletronic door which should validate the passcode to unlock it. In this scenario the `machinist` give us the possibility to provide a function to evaluate a condition and return the new state.
We also could be implementing a state machine for an eletronic door which should validate a passcode to unlock it. In this scenario the `machinist` gives us the possibility to provide a function to evaluate a condition and return the new state.

Check out the diagram below representing it:

Expand Down
2 changes: 1 addition & 1 deletion lib/machinist.ex
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ defmodule Machinist do
from :test, to: :reproved
end
defp check_passcode(%Door{score: score}) do
defp check_score(%{score: score}) do
if score >= 70, do: :approved, else: :reproved
end
"""
Expand Down

0 comments on commit 24e528c

Please sign in to comment.