Class: Graphviz::Diagram::ClassDiagram::Link

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

Overview

Relationship between entities

Direct Known Subclasses

Aggragation, Composition, Generalization, Realization

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(from, to, attributes = {}) ⇒ Link

Returns a new instance of Link.



125
126
127
128
# File 'lib/graphviz/diagram/class_diagram.rb', line 125

def initialize(from, to, attributes = {})
  attrs = default_attrs.merge(attributes)
  @from, @to, @attributes = from, to, attrs
end

Instance Attribute Details

#attributesObject

From and to are entities links each other



123
124
125
# File 'lib/graphviz/diagram/class_diagram.rb', line 123

def attributes
  @attributes
end

#fromObject

From and to are entities links each other



123
124
125
# File 'lib/graphviz/diagram/class_diagram.rb', line 123

def from
  @from
end

#toObject

From and to are entities links each other



123
124
125
# File 'lib/graphviz/diagram/class_diagram.rb', line 123

def to
  @to
end

Instance Method Details

#default_attrsObject



130
131
132
# File 'lib/graphviz/diagram/class_diagram.rb', line 130

def default_attrs
  {}
end