Class: MOSAIK::Graph::Edge

Inherits:
Object
  • Object
show all
Extended by:
T::Sig
Defined in:
lib/mosaik/graph/edge.rb

Overview

Edge in the graph

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = T.let({}, Attributes)) ⇒ Edge

Returns a new instance of Edge.



17
18
19
# File 'lib/mosaik/graph/edge.rb', line 17

def initialize(attributes = T.let({}, Attributes))
  @attributes = attributes
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



14
15
16
# File 'lib/mosaik/graph/edge.rb', line 14

def attributes
  @attributes
end

Instance Method Details

#inspectObject



22
23
24
# File 'lib/mosaik/graph/edge.rb', line 22

def inspect
  "#<#{self.class.name} attributes=#{attributes.map { |k, v| "#{k}: #{v}" }.join(',')}>"
end