Skip to content
Browse files

- Fixed 1.9.3 warnings.

+ Renamed arrow_none to none_arrow.
+ Renamed box to box_arrow (because the box shape was already defined).
+ Renamed diamond to diamond_arrow (because the diamond shape was already defined).

[git-p4: depot-paths = "//src/graph/dev/": change = 6861]
  • Loading branch information...
1 parent 5604f3c commit 6e62caab5a280eec06ce53c287ea041946a13d85 @zenspider zenspider committed
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/graph.rb
View
8 lib/graph.rb
@@ -70,7 +70,12 @@ class Graph
end
ARROWS.each do |name|
- method_name = name.sub(/none/, 'arrow_none')
+ method_name = {
+ "none" => "none_arrow",
+ "box" => "box_arrow",
+ "diamond" => "diamond_arrow",
+ }[name] || name
+
define_method(method_name) { arrowhead name }
end
@@ -493,7 +498,6 @@ class Node < Thingy
attr_accessor :name
def connected?
- node = self.name
edges = graph.edges
edges.include?(name) or edges.any? { |from, deps| deps.include? name }

0 comments on commit 6e62caa

Please sign in to comment.
Something went wrong with that request. Please try again.