Class: Steffi::Edge
- Inherits:
-
Object
- Object
- Steffi::Edge
- Defined in:
- lib/steffi/edge.rb
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#graph ⇒ Object
Returns the value of attribute graph.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
-
#initialize(graph, from, to) ⇒ Edge
constructor
A new instance of Edge.
- #to_s ⇒ Object
Constructor Details
#initialize(graph, from, to) ⇒ Edge
Returns a new instance of Edge.
5 6 7 8 9 |
# File 'lib/steffi/edge.rb', line 5 def initialize graph,from,to @graph = graph @from = from @to = to end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
3 4 5 |
# File 'lib/steffi/edge.rb', line 3 def from @from end |
#graph ⇒ Object
Returns the value of attribute graph.
3 4 5 |
# File 'lib/steffi/edge.rb', line 3 def graph @graph end |
#to ⇒ Object
Returns the value of attribute to.
3 4 5 |
# File 'lib/steffi/edge.rb', line 3 def to @to end |
Instance Method Details
#to_s ⇒ Object
11 12 13 |
# File 'lib/steffi/edge.rb', line 11 def to_s "(#{from},#{to})" end |