Class: DBA::DBMLPrinter
Instance Method Summary
collapse
#initialize, #print_diagram, #print_end, #print_start, #print_table
Instance Method Details
#print_column(name, type) ⇒ Object
12
13
14
|
# File 'lib/dba/dbml_printer.rb', line 12
def print_column(name, type)
@io.puts " #{name} #{type}"
end
|
#print_foreign_key(table, column, other_table, other_column) ⇒ Object
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
|
#print_table_end(name) ⇒ Object
8
9
10
|
# File 'lib/dba/dbml_printer.rb', line 8
def print_table_end(name)
@io.puts '}'
end
|
#print_table_start(name) ⇒ Object
4
5
6
|
# File 'lib/dba/dbml_printer.rb', line 4
def print_table_start(name)
@io.puts "Table #{name} {"
end
|