lib/visualize_ruby/edge.rb in visualize_ruby-0.5.0 vs lib/visualize_ruby/edge.rb in visualize_ruby-0.6.0

- old
+ new

@@ -2,17 +2,19 @@ class Edge attr_reader :name, :node_a, :node_b, :dir, - :style + :style, + :color - def initialize(name: nil, nodes:, dir: :forward, style: :solid) + def initialize(name: nil, nodes:, dir: :forward, style: :solid, color: nil) @name = name.to_s if name @node_a = nodes[0] @node_b = nodes[1] @dir = dir @style = style + @color = color end def to_a [ node_a.name.to_s,