Module: SchemaComments::ConnectionAdapters::TableDefinition

Defined in:
lib/schema_comments/connection_adapters.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#commentObject

Returns the value of attribute comment.



14
15
16
# File 'lib/schema_comments/connection_adapters.rb', line 14

def comment
  @comment
end

Instance Method Details

#column(name, type, options = {}) ⇒ Object



16
17
18
19
20
21
# File 'lib/schema_comments/connection_adapters.rb', line 16

def column(name, type, options = {})
  result = super(name, type, options)
  column = self[name]
  column.comment = options[:comment]
  result
end