Class: Edge

Inherits:
Object
  • Object
show all
Defined in:
lib/structure/edge.rb

Overview

Record Edge

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ Edge



5
6
7
8
9
10
# File 'lib/structure/edge.rb', line 5

def initialize(params)
  @id    = params.shift.to_i
  @src   = params.shift.to_i
  @dst   = params.shift.to_i
  @attrs = params
end

Instance Attribute Details

#attrsObject

Returns the value of attribute attrs.



3
4
5
# File 'lib/structure/edge.rb', line 3

def attrs
  @attrs
end

#dstObject

Returns the value of attribute dst.



3
4
5
# File 'lib/structure/edge.rb', line 3

def dst
  @dst
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/structure/edge.rb', line 3

def id
  @id
end

#srcObject

Returns the value of attribute src.



3
4
5
# File 'lib/structure/edge.rb', line 3

def src
  @src
end