# Connect this vertex to another, creating an Edge to do so, and returning
# the Edge
- def connect(other)
- e = Edge.new
+ def connect(other, edge_attributes = {})
+ e = Edge.new edge_attributes
e << self << other
# self.edges << e
# other.edges << e unless self === other
e.vertices.drop_while {|v| v != self}[1..-1]}.flatten
end
+ def to_s
+ '<V: ' + self.name + '>'
+ end
+
end
end