lib/grumlin/vertex.rb in grumlin-1.0.0.rc5 vs lib/grumlin/vertex.rb in grumlin-1.0.0.rc6

- old
+ new

@@ -1,12 +1,13 @@ # frozen_string_literal: true class Grumlin::Vertex - attr_reader :label, :id + attr_reader :label, :id, :properties - def initialize(label:, id:) + def initialize(label:, id:, properties: nil) @label = label @id = Grumlin::Typing.cast(id) + @properties = properties&.transform_values { |v| Grumlin::Typing.cast(v) } end def ==(other) self.class == other.class && @label == other.label && @id == other.id end