Skip to content

Commit 44b5af7

Browse files
committed
Add diagram-based example output
1 parent 983169c commit 44b5af7

File tree

8 files changed

+190
-213
lines changed

8 files changed

+190
-213
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Gemfile.lock
77
InstalledFiles
88
_yardoc
99
coverage
10-
doc/
10+
doc/*
11+
!doc/switch.svg
1112
lib/bundler/man
1213
pkg
1314
rdoc

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,16 @@ in the class. The generated files will use an output filename of the format
6969
For examples of actual images generated using this task, see those under the
7070
examples folder.
7171

72+
#### Example output
73+
74+
Generate the sample diagram used in this README:
75+
76+
```bash
77+
bundle exec ruby script/generate_example.rb
78+
```
79+
80+
![Switch state machine](doc/switch.svg)
81+
7282
### Interactive graphs
7383

7484
Jean Bovet's [Visual Automata Simulator](https://github.com/NimaGhaedsharafi/VAS)

doc/switch.svg

Lines changed: 84 additions & 0 deletions
Loading

lib/state_machines-graphviz.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# frozen_string_literal: true
22

3+
require 'state_machines-diagram'
34
require 'state_machines/graphviz'
45
require 'state_machines/graphviz/renderer'
56

lib/state_machines/graphviz/monkeypatch.rb

Lines changed: 0 additions & 184 deletions
This file was deleted.

0 commit comments

Comments
 (0)