class StateMachines::Event
Public Instance Methods
draw(graph, options = {})
click to toggle source
Draws a representation of this event on the given graph. This will create 1 or more edges on the graph for each branch (i.e. transition) configured.
Configuration options:
-
:human_name
- Whether to use the event's human name for the node's label that gets drawn on the graph
# File lib/state_machines/graphviz/monkeypatch.rb, line 108 def draw(graph, options = {}) valid_states = machine.states.by_priority.map {|state| state.name} branches.each do |branch| branch.draw(graph, options[:human_name] ? human_name : name, valid_states) end true end