Class: SchemaPlus::Core::SchemaDump::Table::Index

Inherits:
Object
  • Object
show all
Defined in:
lib/schema_plus/core/schema_dump.rb

Instance Method Summary collapse

Instance Method Details

#add_option(option) ⇒ Object



108
109
110
# File 'lib/schema_plus/core/schema_dump.rb', line 108

def add_option(option)
  self.options = [options, option].reject(&:blank?).join(', ')
end

#assemble(stream) ⇒ Object



112
113
114
115
116
117
118
# File 'lib/schema_plus/core/schema_dump.rb', line 112

def assemble(stream)
  stream.write [
    columns.inspect,
    "name: #{name.inspect}",
    options
  ].reject(&:blank?).join(", ")
end