GraphvizSourceGraphvizEdge

class Edge

Represents a visual edge between two nodes.

Definitions

def initialize(graph, source, destination, attributes = {})

Initialize the edge in the given graph, with a source and destination node.

Implementation

def initialize(graph, source, destination, attributes = {})
	@graph = graph
	@graph.edges << self
	
	@source = source
	@destination = destination
	
	@attributes = attributes
end

attr :source

attr :destination

attr_accessor :attributes

def to_s

Implementation

def to_s
	"#{@source} -> #{@destination}"
end