Class: MermaidRailsErd::RelationshipSymbolMapper

Inherits:
Object
  • Object
show all
Defined in:
lib/mermaid_rails_erd/relationship_symbol_mapper.rb

Instance Method Summary collapse

Instance Method Details

#map(assoc_type) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/mermaid_rails_erd/relationship_symbol_mapper.rb', line 5

def map(assoc_type)
  {
    has_many: "||--o{",
    has_one: "||--||",
    belongs_to: "}o--||",
  }[assoc_type] || "--"
end