Class: GraphReader::Edge
- Inherits:
-
Object
- Object
- GraphReader::Edge
- Defined in:
- lib/structure/edge.rb
Overview
Record Edge
Instance Attribute Summary collapse
-
#attrs ⇒ Object
Returns the value of attribute attrs.
-
#dst ⇒ Object
Returns the value of attribute dst.
-
#id ⇒ Object
Returns the value of attribute id.
-
#src ⇒ Object
Returns the value of attribute src.
Instance Method Summary collapse
-
#initialize(params) ⇒ Edge
constructor
A new instance of Edge.
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
#attrs ⇒ Object
Returns the value of attribute attrs.
4 5 6 |
# File 'lib/structure/edge.rb', line 4 def attrs @attrs end |
#dst ⇒ Object
Returns the value of attribute dst.
4 5 6 |
# File 'lib/structure/edge.rb', line 4 def dst @dst end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/structure/edge.rb', line 4 def id @id end |
#src ⇒ Object
Returns the value of attribute src.
4 5 6 |
# File 'lib/structure/edge.rb', line 4 def src @src end |