module DBDiagram::Diagram::Graphviz::Simple
Public Instance Methods
entity_style(entity, attributes)
click to toggle source
# File lib/db_diagram/diagram/graphviz.rb, line 98 def entity_style(entity, attributes) {}.tap do |options| options[:fontcolor] = options[:color] = :grey60 if entity.abstract? end end
relationship_style(relationship)
click to toggle source
# File lib/db_diagram/diagram/graphviz.rb, line 104 def relationship_style(relationship) {}.tap do |options| # options[:style] = :dotted #虚线 # Closed arrows for to/from many. options[:arrowhead] = relationship.to_many? ? "normal" : "none" options[:arrowtail] = relationship.many_to? ? "normal" : "none" end end