Class: DBA::PlantUMLPrinter

Inherits:
DiagramPrinter show all
Defined in:
lib/dba/plant_uml_printer.rb

Instance Method Summary collapse

Methods inherited from DiagramPrinter

#initialize, #print_diagram, #print_table

Constructor Details

This class inherits a constructor from DBA::DiagramPrinter

Instance Method Details



21
22
23
# File 'lib/dba/plant_uml_printer.rb', line 21

def print_column(name, type)
  @io.puts "  #{name} => #{type}"
end


9
10
11
# File 'lib/dba/plant_uml_printer.rb', line 9

def print_end
  @io.puts '@enduml'
end


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


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


17
18
19
# File 'lib/dba/plant_uml_printer.rb', line 17

def print_table_end(name)
  @io.puts '}'
end


13
14
15
# File 'lib/dba/plant_uml_printer.rb', line 13

def print_table_start(name)
  @io.puts "map #{name} {"
end