lib/grumlin/vertex.rb in grumlin-0.23.0 vs lib/grumlin/vertex.rb in grumlin-1.0.0.rc1

- old
+ new

@@ -1,24 +1,22 @@ # frozen_string_literal: true -module Grumlin - class Vertex - attr_reader :label, :id +class Grumlin::Vertex + attr_reader :label, :id - def initialize(label:, id:) - @label = label - @id = Typing.cast(id) - end + def initialize(label:, id:) + @label = label + @id = Grumlin::Typing.cast(id) + end - def ==(other) - self.class == other.class && @label == other.label && @id == other.id - end + def ==(other) + self.class == other.class && @label == other.label && @id == other.id + end - def inspect - "v[#{@id}]" - end + def inspect + "v[#{@id}]" + end - def to_s - inspect - end + def to_s + inspect end end