Sha256: bbb3ea26916c22dbde64871e87cba08a22d58007577c46cbbb5025a5f2b1eed0

Contents?: true

Size: 358 Bytes

Versions: 4

Compression:

Stored size: 358 Bytes

Contents

require 'digest'

class DebugGraph
  def initialize
    @g = Graph.new
  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(opts)
    @g.output(opts)
  end

  private
  def h(msg)
    Digest::SHA256.hexdigest msg
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
aws_security_viz-0.1.2.pre.alpha.pre.58 lib/debug_graph.rb
aws_security_viz-0.1.1 lib/debug_graph.rb
aws_security_viz-0.1.1.pre.alpha.pre.56 lib/debug_graph.rb
aws_security_viz-0.1.0 lib/debug_graph.rb