Create a gist now

Instantly share code, notes, and snippets.

Graphviz files for reference graph refactoring example
digraph AlphaSoup {
"@state0"
"@state1"
"@state2"
node[shape=box]
"E.report"
node[color=green]
"A#ones"
"B#zeros"
"B#get_state"
node[color=orange]
"A#report"
"C#report"
"E.report" -> "A#report"
"E.report" -> "C#report"
"A#report" -> "B#zeros"
"A#report" -> "A#ones"
"A#ones" -> "B#get_state"
"B#zeros" -> "@state0"
"B#get_state" -> "@state1"
"C#report" -> "@state2"
}
digraph AlphaSoup {
"@state0"
"@state1"
"@state2"
node[shape=box]
"E.report"
node[color=red]
"B#munge_state"
"B#get_all_the_state"
"B#get_state"
"D#get_state"
node[color=orange]
"A#report"
"C#report"
"E.report" -> "A#report"
"E.report" -> "C#report"
"A#report" -> "B#get_all_the_state"
"B#get_all_the_state" -> "B#munge_state"
"B#get_all_the_state" -> "B#get_state"
"B#get_all_the_state" -> "D#get_state"
"B#get_all_the_state" -> "@state1"
"B#munge_state" -> "B#get_state"
"B#get_state" -> "@state0"
"C#report" -> "D#get_state"
"D#get_state" -> "@state2"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment