Class: Edge

Inherits:
Object
  • Object
show all
Defined in:
lib/rtl/graph.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#sinkObject

Returns the value of attribute sink.



38
39
40
# File 'lib/rtl/graph.rb', line 38

def sink
  @sink
end

#sourceObject

Returns the value of attribute source.



38
39
40
# File 'lib/rtl/graph.rb', line 38

def source
  @source
end