Sha256: 5d9f0284d374a3dbead20df6a8ed0152e9a940335e48d6e9a82c1959585b069a

Contents?: true

Size: 565 Bytes

Versions: 15

Compression:

Stored size: 565 Bytes

Contents

# frozen_string_literal: true

class Grumlin::Edge
  attr_reader :label, :id, :inVLabel, :outVLabel, :inV, :outV

  def initialize(label:, id:, inVLabel:, outVLabel:, inV:, outV:)
    @label = label
    @id = Grumlin::Typing.cast(id)
    @inVLabel = inVLabel
    @outVLabel = outVLabel
    @inV = Grumlin::Typing.cast(inV)
    @outV = Grumlin::Typing.cast(outV)
  end

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

  def inspect
    "e[#{@id}][#{@outV}-#{@label}->#{@inV}]"
  end

  def to_s
    inspect
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

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