Class: Edge
- Inherits:
-
Object
- Object
- Edge
- Defined in:
- lib/rtl/graph.rb
Instance Attribute Summary collapse
-
#sink ⇒ Object
Returns the value of attribute sink.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(params = {}) ⇒ Edge
constructor
A new instance of Edge.
Constructor Details
#initialize(params = {}) ⇒ Edge
Returns a new instance of Edge.
39 40 41 42 43 44 45 |
# File 'lib/rtl/graph.rb', line 39 def initialize params={} unless params.empty? @source=params["source"] @sink =params["sink"] puts "creating edge #{@source.id}-->#{@sink.id}" end end |
Instance Attribute Details
#sink ⇒ Object
Returns the value of attribute sink.
38 39 40 |
# File 'lib/rtl/graph.rb', line 38 def sink @sink end |
#source ⇒ Object
Returns the value of attribute source.
38 39 40 |
# File 'lib/rtl/graph.rb', line 38 def source @source end |