Class: SchemaPlus::Core::SchemaDump::Table::Column
- Inherits:
-
Object
- Object
- SchemaPlus::Core::SchemaDump::Table::Column
- Defined in:
- lib/schema_plus/core/schema_dump.rb
Instance Method Summary collapse
Instance Method Details
#assemble(stream, typelen, namelen) ⇒ Object
90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/schema_plus/core/schema_dump.rb', line 90 def assemble(stream, typelen, namelen) stream.write "t.%-#{typelen}s " % type if .blank? && comments.blank? stream.write name.inspect else pr = name.inspect pr += ',' unless .blank? stream.write "%-#{namelen+3}s " % pr end stream.write .to_s.sub(/^{(.*)}$/, '\1') unless .blank? stream.write ' ' unless .blank? or comments.blank? stream.write '# ' + comments.join('; ') unless comments.blank? end |