Sha256: 6f9639d162319f6dd2c564ee2a1af2140e7873096b905bd7363d46fe4de51037
Contents?: true
Size: 407 Bytes
Versions: 15
Compression:
Stored size: 407 Bytes
Contents
require 'digest' require_relative 'graph' class DebugGraph def initialize(config) @g = Graph.new(config) end def add_node(name) @g.add_node(h(name)) if name end def add_edge(from, to, opts) @g.add_edge(h(from), h(to), opts.update(label: h(opts[:label]))) end def output(renderer) @g.output(renderer) end private def h(msg) Digest::SHA256.hexdigest msg end end
Version data entries
15 entries across 15 versions & 1 rubygems