Class: Johnson::Visitors::DotVisitor::Link
- Inherits:
-
Struct
- Object
- Struct
- Johnson::Visitors::DotVisitor::Link
- Defined in:
- lib/johnson/visitors/dot_visitor.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
-
#from ⇒ Object
Returns the value of attribute from.
-
#to ⇒ Object
Returns the value of attribute to.
Instance Method Summary collapse
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes
17 18 19 |
# File 'lib/johnson/visitors/dot_visitor.rb', line 17 def attributes @attributes end |
#from ⇒ Object
Returns the value of attribute from
17 18 19 |
# File 'lib/johnson/visitors/dot_visitor.rb', line 17 def from @from end |
#to ⇒ Object
Returns the value of attribute to
17 18 19 |
# File 'lib/johnson/visitors/dot_visitor.rb', line 17 def to @to end |
Instance Method Details
#to_s ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/johnson/visitors/dot_visitor.rb', line 18 def to_s attrs = '' if attributes attrs = " [" + attributes.map { |attribute| attribute.join(' = ') }.join("; ") + "]" end "\"#{from}\" -> \"#{to}\"#{attrs};" end |