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

- old
+ new

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