class DebugGraph
Public Class Methods
new(config)
click to toggle source
# File lib/debug_graph.rb, line 5 def initialize(config) @g = Graph.new(config) end
Public Instance Methods
add_edge(from, to, opts)
click to toggle source
# File lib/debug_graph.rb, line 13 def add_edge(from, to, opts) @g.add_edge(h(from), h(to), opts.update(label: h(opts[:label]))) end
add_node(name, opts)
click to toggle source
# File lib/debug_graph.rb, line 9 def add_node(name, opts) @g.add_node(h(name), opts) if name end
filter(source, destination)
click to toggle source
# File lib/debug_graph.rb, line 17 def filter(source, destination) @g.filter(source, destination) end
output(renderer)
click to toggle source
# File lib/debug_graph.rb, line 21 def output(renderer) @g.output(renderer) end
Private Instance Methods
h(msg)
click to toggle source
# File lib/debug_graph.rb, line 26 def h(msg) Digest::SHA256.hexdigest msg end