# design_api.rb

Path: | lib/design_api.rb
Last Update: | Fri Jun 20 18:41:18 +0900 2008

Struct

### Methods

to_book

### Public Class methods

to_book()

[Source]

          # File lib/design_api.rb, line 1255
    1255:   def self.to_book
    1256:     book = ApplicationTableStruct::Book.new
    1257:     book.main_sheet = ApplicationTableStruct::MainSheet.new
    1258:     book.main_sheet.tables = []
    1259:     ApplicationTable.find(:all).each do |t|
    1260:       table = ApplicationTableStruct::Table.new
    1261:       table.name = t.name
    1262:       table.columns = []
    1263:       t.table_columns.each do |c|
    1264:         column = ApplicationTableStruct::Column.new
    1265:         column.name = c.name
    1266:         column.type = c.class.to_s
    1267:         column.length = c.length
    1268:         table.columns << column
    1269:       end
    1270:       book.main_sheet.tables << table
    1271:     end
    1272:     return book
    1273:   end

[Validate]