class Utracker::Drawer
Constants
- Node
Public Instance Methods
write_graph(filename)
click to toggle source
# File lib/utracker/drawer.rb, line 9 def write_graph(filename) File.open(filename, 'w') do |file| file.puts "digraph message_flow {" file.puts " node [style=filled fillcolor=white]" file.puts " rankdir=LR" write_graph_into(file) file.puts "}" end end
Protected Instance Methods
build_graph()
click to toggle source
# File lib/utracker/drawer.rb, line 21 def build_graph fail 'Please implement me in subclasses.' end
Private Instance Methods
write_graph_into(file)
click to toggle source
# File lib/utracker/drawer.rb, line 27 def write_graph_into(file) build_graph.each do |node| file.puts " #{node.service}" node.edges && node.edges.each do |connected_node| file.puts " #{node.service} -> #{connected_node.service}" end end end