Module: DBDiagram::Diagram::Graphviz::Bachman
- Includes:
- Simple
- Defined in:
- lib/db_diagram/diagram/graphviz.rb
Instance Method Summary collapse
Methods included from Simple
Instance Method Details
#relationship_style(relationship) ⇒ Object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/db_diagram/diagram/graphviz.rb', line 139 def relationship_style(relationship) {}.tap do || # options[:style] = :dotted #虚线 # Participation is "look-here". dst = relationship.source_optional? ? "odot" : "dot" src = relationship.destination_optional? ? "odot" : "dot" # Cardinality is "look-across". dst << "normal" if relationship.to_many? src << "normal" if relationship.many_to? [:arrowsize] = 0.6 [:arrowhead], [:arrowtail] = dst, src end end |