Sha256: 46aab06cc5452b805f69198eaaf3514ff7aadd591da92d0d340d1296eaf501fe

Contents?: true

Size: 735 Bytes

Versions: 3

Compression:

Stored size: 735 Bytes

Contents

# frozen_string_literal: true

# rubocop:disable Naming/VariableName,Naming/MethodParameterName,Naming/MethodName
module Grumlin
  class Edge
    attr_reader :label, :id, :inVLabel, :outVLabel, :inV, :outV

    def initialize(label:, id:, inVLabel:, outVLabel:, inV:, outV:) # rubocop:disable Metrics/ParameterLists
      @label = label
      @id = Typing.cast(id)
      @inVLabel = inVLabel
      @outVLabel = outVLabel
      @inV = Typing.cast(inV)
      @outV = Typing.cast(outV)
    end

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

    def inspect
      "<E #{@label}(#{@id})>"
    end
    alias to_s inspect
  end
end
# rubocop:enable Naming/MethodParameterName,Naming/VariableName,Naming/MethodName

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
grumlin-0.1.3 lib/grumlin/edge.rb
grumlin-0.1.1 lib/grumlin/edge.rb
grumlin-0.1.0 lib/grumlin/edge.rb