Class: DBA::DBMLPrinter

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

Instance Method Summary collapse

Methods inherited from DiagramPrinter

#initialize, #print_diagram, #print_end, #print_start, #print_table

Constructor Details

This class inherits a constructor from DBA::DiagramPrinter

Instance Method Details



12
13
14
# File 'lib/dba/dbml_printer.rb', line 12

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


16
17
18
# File 'lib/dba/dbml_printer.rb', line 16

def print_foreign_key(table, column, other_table, other_column)
  @io.puts %{Ref: #{table}.#{column} > #{other_table}.#{other_column}}
end


8
9
10
# File 'lib/dba/dbml_printer.rb', line 8

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


4
5
6
# File 'lib/dba/dbml_printer.rb', line 4

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