Class: Graphviz::Edge
- Inherits:
-
Object
- Object
- Graphviz::Edge
- Defined in:
- lib/graphviz/graph.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#line ⇒ Object
Returns the value of attribute line.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#source ⇒ Object
readonly
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(graph, source, destination, attributes = {}) ⇒ Edge
constructor
A new instance of Edge.
- #to_s ⇒ Object
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
#attributes ⇒ Object
Returns the value of attribute attributes.
76 77 78 |
# File 'lib/graphviz/graph.rb', line 76 def attributes @attributes end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
74 75 76 |
# File 'lib/graphviz/graph.rb', line 74 def destination @destination end |
#line ⇒ Object
Returns the value of attribute line.
79 80 81 |
# File 'lib/graphviz/graph.rb', line 79 def line @line end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
78 79 80 |
# File 'lib/graphviz/graph.rb', line 78 def @options end |
#source ⇒ Object (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_s ⇒ Object
81 82 83 |
# File 'lib/graphviz/graph.rb', line 81 def to_s '->' end |