Class: SQL::TableCreator::Column
- Inherits:
-
Object
- Object
- SQL::TableCreator::Column
- Defined in:
- lib/dm-migrations/sql/table_creator.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#type ⇒ Object
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(adapter, name, type, opts = {}) ⇒ Column
constructor
A new instance of Column.
- #to_sql ⇒ Object
Constructor Details
#initialize(adapter, name, type, opts = {}) ⇒ Column
Returns a new instance of Column.
56 57 58 59 60 61 |
# File 'lib/dm-migrations/sql/table_creator.rb', line 56 def initialize(adapter, name, type, opts = {}) @adapter = adapter @name = name.to_s @opts = opts @type = build_type(type) end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
54 55 56 |
# File 'lib/dm-migrations/sql/table_creator.rb', line 54 def name @name end |
#type ⇒ Object
Returns the value of attribute type.
54 55 56 |
# File 'lib/dm-migrations/sql/table_creator.rb', line 54 def type @type end |
Instance Method Details
#to_sql ⇒ Object
63 64 65 |
# File 'lib/dm-migrations/sql/table_creator.rb', line 63 def to_sql type end |