Public instance methods
entity_style
(entity, attributes)
[show source]
# File lib/rails_erd/diagram/graphviz.rb, line 85 def entity_style(entity, attributes) {}.tap do |options| options[:fontcolor] = options[:color] = :grey60 if entity.abstract? end end
relationship_style
(relationship)
[show source]
# File lib/rails_erd/diagram/graphviz.rb, line 91 def relationship_style(relationship) {}.tap do |options| options[:style] = :dotted if relationship.indirect? # Closed arrows for to/from many. options[:arrowhead] = relationship.to_many? ? "normal" : "none" options[:arrowtail] = relationship.many_to? ? "normal" : "none" end end
specialization_style
(specialization)
[show source]
# File lib/rails_erd/diagram/graphviz.rb, line 101 def specialization_style(specialization) { :color => :grey60, :arrowtail => :onormal, :arrowhead => :none, :arrowsize => 1.2 } end