module DBDiagram::Diagram::Graphviz::Crowsfoot
Public Instance Methods
relationship_style(relationship)
click to toggle source
# File lib/db_diagram/diagram/graphviz.rb, line 118 def relationship_style(relationship) {}.tap do |options| # 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") options[:arrowsize] = 0.6 options[:arrowhead], options[:arrowtail] = dst, src end end