Class: GraphReader::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

Returns a new instance of Edge.



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

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.



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

def attrs
  @attrs
end

#dstObject

Returns the value of attribute dst.



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

def dst
  @dst
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

#srcObject

Returns the value of attribute src.



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

def src
  @src
end