Class: Graphviz::Edge

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(graph, source, destination, attributes = {}) ⇒ Edge

Returns a new instance of Edge.



63
64
65
66
67
68
69
70
71
# File 'lib/graphviz/graph.rb', line 63

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

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes.



76
77
78
# File 'lib/graphviz/graph.rb', line 76

def attributes
  @attributes
end

#destinationObject (readonly)

Returns the value of attribute destination.



74
75
76
# File 'lib/graphviz/graph.rb', line 74

def destination
  @destination
end

#lineObject

Returns the value of attribute line.



79
80
81
# File 'lib/graphviz/graph.rb', line 79

def line
  @line
end

#optionsObject (readonly)

Returns the value of attribute options.



78
79
80
# File 'lib/graphviz/graph.rb', line 78

def options
  @options
end

#sourceObject (readonly)

Returns the value of attribute source.



73
74
75
# File 'lib/graphviz/graph.rb', line 73

def source
  @source
end

Instance Method Details

#to_sObject



81
82
83
# File 'lib/graphviz/graph.rb', line 81

def to_s
	'->'
end