Class: Lhm::ColumnWithSql
- Inherits:
-
Object
- Object
- Lhm::ColumnWithSql
- Extended by:
- Forwardable
- Defined in:
- lib/lhm/column_with_sql.rb
Overview
Abstracts the details of a table column definition when specified with a MySQL column definition string
Instance Method Summary collapse
-
#attributes ⇒ Array
Returns the column data as an Array to be used with the splat operator.
-
#initialize(name, definition) ⇒ ColumnWithSql
constructor
Constructor.
Constructor Details
#initialize(name, definition) ⇒ ColumnWithSql
Constructor
13 14 15 16 |
# File 'lib/lhm/column_with_sql.rb', line 13 def initialize(name, definition) @name = name @definition = definition end |
Instance Method Details
#attributes ⇒ Array
Returns the column data as an Array to be used with the splat operator. See Lhm::Adaper#add_column
22 23 24 |
# File 'lib/lhm/column_with_sql.rb', line 22 def attributes [type, ] end |