lib/end_state/graph.rb in end_state-0.10.1 vs lib/end_state/graph.rb in end_state-0.11.0
- old
+ new
@@ -10,19 +10,19 @@
end
def draw
machine.transitions.keys.each do |t|
left, right = t.to_a.flatten
- nodes[left] ||= add_node(left.to_s)
- nodes[right] ||= add_node(right.to_s)
- edge = add_edge nodes[left], nodes[right]
+ nodes[left] ||= add_nodes(left.to_s)
+ nodes[right] ||= add_nodes(right.to_s)
+ edge = add_edges nodes[left], nodes[right]
if event_labels
event = machine.events.detect do |event, transition|
transition.include? t
end
edge[:label] = event.first.to_s if event
end
end
self
end
end
-end
\ No newline at end of file
+end