Class: UML::Graphviz::Edge
- Inherits:
-
Object
- Object
- UML::Graphviz::Edge
- Defined in:
- lib/uml/graphviz_helper.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#attributes ⇒ Object
readonly
Returns the value of attribute attributes.
Instance Method Summary collapse
-
#initialize(tail, head) ⇒ Edge
constructor
A new instance of Edge.
- #to_dot(indent = 0) ⇒ Object
Constructor Details
#initialize(tail, head) ⇒ Edge
Returns a new instance of Edge.
77 78 79 80 81 |
# File 'lib/uml/graphviz_helper.rb', line 77 def initialize(tail, head) @tail = tail @head = head @attributes = Attributes.new end |
Instance Attribute Details
#attributes ⇒ Object (readonly)
Returns the value of attribute attributes.
75 76 77 |
# File 'lib/uml/graphviz_helper.rb', line 75 def attributes @attributes end |
Instance Method Details
#to_dot(indent = 0) ⇒ Object
83 84 85 |
# File 'lib/uml/graphviz_helper.rb', line 83 def to_dot(indent = 0) "#{' ' * indent}#{Graph::name_to_id(@tail)} -> #{Graph::name_to_id(@head)} #{@attributes.to_dot};" end |