Module: DBDiagram::Diagram::Graphviz::Crowsfoot
- 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
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/db_diagram/diagram/graphviz.rb', line 118 def relationship_style(relationship) {}.tap do || # options[:style] = :dotted #虚线 # Cardinality is "look-across". dst = relationship.to_many? ? "crow" : "tee" src = relationship.many_to? ? "crow" : "tee" # Participation is "look-across". dst << (relationship.destination_optional? ? "odot" : "tee") src << (relationship.source_optional? ? "odot" : "tee") [:arrowsize] = 0.6 [:arrowhead], [:arrowtail] = dst, src end end |