Sha256: 84568dd71b24dcb0dc02b7da5061174e71a5fbac4d7123c89ef581df65140c6e

Contents?: true

Size: 384 Bytes

Versions: 15

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

class Grumlin::VertexProperty
  attr_reader :label, :value

  def initialize(value)
    @label = value[:label]
    @value = Grumlin::Typing.cast(value[:value])
  end

  def inspect
    "vp[#{label}->#{value}]"
  end

  def to_s
    inspect
  end

  def ==(other)
    self.class == other.class && @label == other.label && @value == other.value
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
grumlin-1.2.0 lib/grumlin/vertex_property.rb
grumlin-1.1.0 lib/grumlin/vertex_property.rb
grumlin-1.0.4 lib/grumlin/vertex_property.rb
grumlin-1.0.3 lib/grumlin/vertex_property.rb
grumlin-1.0.3.beta1 lib/grumlin/vertex_property.rb
grumlin-1.0.2 lib/grumlin/vertex_property.rb
grumlin-1.0.1 lib/grumlin/vertex_property.rb
grumlin-1.0.0 lib/grumlin/vertex_property.rb
grumlin-1.0.0.rc7 lib/grumlin/vertex_property.rb
grumlin-1.0.0.rc6 lib/grumlin/vertex_property.rb
grumlin-1.0.0.rc5 lib/grumlin/vertex_property.rb
grumlin-1.0.0.rc4 lib/grumlin/vertex_property.rb
grumlin-1.0.0.rc3 lib/grumlin/vertex_property.rb
grumlin-1.0.0.rc2 lib/grumlin/vertex_property.rb
grumlin-1.0.0.rc1 lib/grumlin/vertex_property.rb