Class: DBA::PlantUMLPrinter
Instance Method Summary
collapse
#initialize, #print_diagram, #print_table
Instance Method Details
#print_column(name, type) ⇒ Object
21
22
23
|
# File 'lib/dba/plant_uml_printer.rb', line 21
def print_column(name, type)
@io.puts " #{name} => #{type}"
end
|
#print_end ⇒ Object
9
10
11
|
# File 'lib/dba/plant_uml_printer.rb', line 9
def print_end
@io.puts '@enduml'
end
|
#print_foreign_key(table, column, other_table, other_column) ⇒ Object
25
26
27
|
# File 'lib/dba/plant_uml_printer.rb', line 25
def print_foreign_key(table, column, other_table, other_column)
@io.puts %{#{table}::#{column} *-> #{other_table}::#{other_column}}
end
|
#print_start ⇒ Object
4
5
6
7
|
# File 'lib/dba/plant_uml_printer.rb', line 4
def print_start
@io.puts '@startuml'
@io.puts 'left to right direction'
end
|
#print_table_end(name) ⇒ Object
17
18
19
|
# File 'lib/dba/plant_uml_printer.rb', line 17
def print_table_end(name)
@io.puts '}'
end
|
#print_table_start(name) ⇒ Object
13
14
15
|
# File 'lib/dba/plant_uml_printer.rb', line 13
def print_table_start(name)
@io.puts "map #{name} {"
end
|