Sha256: f34c91e9b3db6c72b255ce383b61ced4d28bba54db0959a7a02a6b2a2c5e0350

Contents?: true

Size: 588 Bytes

Versions: 35

Compression:

Stored size: 588 Bytes

Contents

# frozen_string_literal: true

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

    def initialize(label:, id:, inVLabel:, outVLabel:, inV:, outV:)
      @label = label
      @id = Typing.cast(id)
      @inVLabel = inVLabel
      @outVLabel = outVLabel
      @inV = Typing.cast(inV)
      @outV = 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
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
grumlin-0.23.0 lib/grumlin/edge.rb
grumlin-0.22.5 lib/grumlin/edge.rb
grumlin-0.22.4 lib/grumlin/edge.rb
grumlin-0.22.3 lib/grumlin/edge.rb
grumlin-0.22.2 lib/grumlin/edge.rb
grumlin-0.22.1 lib/grumlin/edge.rb
grumlin-0.22.0 lib/grumlin/edge.rb
grumlin-0.21.1 lib/grumlin/edge.rb
grumlin-0.21.0 lib/grumlin/edge.rb
grumlin-0.20.2 lib/grumlin/edge.rb
grumlin-0.20.1 lib/grumlin/edge.rb
grumlin-0.20.0 lib/grumlin/edge.rb
grumlin-0.19.7 lib/grumlin/edge.rb
grumlin-0.19.6 lib/grumlin/edge.rb
grumlin-0.19.5 lib/grumlin/edge.rb
grumlin-0.19.4 lib/grumlin/edge.rb
grumlin-0.19.3 lib/grumlin/edge.rb
grumlin-0.19.2 lib/grumlin/edge.rb
grumlin-0.19.1 lib/grumlin/edge.rb
grumlin-0.19.0 lib/grumlin/edge.rb