Added hash parameter to graph initialization
[graph.njae.git] / lib / graph.njae / vertex.rb
index 4a75b6df2c628c0cba8a25fead7aff670a1c1563..6b34351740c04c0754a5e431f1ea38bd7773a0a0 100644 (file)
@@ -6,8 +6,8 @@ module GraphNjae
   # A vertex in a graph. The edge can have arbitrary attributes,treated as 
   # method names.
   class Vertex < OpenStruct
-    def initialize
-      super
+    def initialize(values = {})
+      super(values)
       self.edges = []
       self
     end