Class: Solidarity::Graph::Edge
- Inherits:
-
Object
- Object
- Solidarity::Graph::Edge
- Defined in:
- lib/solidarity/graph.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(data) ⇒ Edge
constructor
A new instance of Edge.
Constructor Details
#initialize(data) ⇒ Edge
Returns a new instance of Edge.
60 61 62 63 64 65 |
# File 'lib/solidarity/graph.rb', line 60 def initialize(data) @source = data[:source] @target = data[:target] @label = data[:label] @type = data[:type] end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
58 59 60 |
# File 'lib/solidarity/graph.rb', line 58 def label @label end |
#source ⇒ Object (readonly)
Returns the value of attribute source.
58 59 60 |
# File 'lib/solidarity/graph.rb', line 58 def source @source end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
58 59 60 |
# File 'lib/solidarity/graph.rb', line 58 def target @target end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
58 59 60 |
# File 'lib/solidarity/graph.rb', line 58 def type @type end |