Class: WraithDB::Column
- Inherits:
-
ActiveRecord::ConnectionAdapters::Column
- Object
- ActiveRecord::ConnectionAdapters::Column
- WraithDB::Column
- Defined in:
- lib/wraithdb/column.rb
Instance Method Summary collapse
-
#initialize(column_definition) ⇒ Column
constructor
A new instance of Column.
Constructor Details
#initialize(column_definition) ⇒ Column
Returns a new instance of Column.
3 4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/wraithdb/column.rb', line 3 def initialize(column_definition) @name = column_definition.name @sql_type = nil @null = column_definition.null @limit = column_definition.limit @precision = column_definition.precision @scale = column_definition.scale @type = (column_definition.type == :primary_key) ? :integer : column_definition.type.to_sym @default = column_definition.default @primary = column_definition.type == :primary_key @coder = nil end |