Class: Liquigen::CreateTable
- Defined in:
- lib/liquigen/create_table.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#table_name ⇒ Object
Returns the value of attribute table_name.
Instance Method Summary collapse
-
#initialize(table_name) ⇒ CreateTable
constructor
A new instance of CreateTable.
Constructor Details
#initialize(table_name) ⇒ CreateTable
Returns a new instance of CreateTable.
9 10 11 12 |
# File 'lib/liquigen/create_table.rb', line 9 def initialize(table_name) self.table_name = table_name&.underscore&.pluralize self.columns = [] end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
7 8 9 |
# File 'lib/liquigen/create_table.rb', line 7 def columns @columns end |
#table_name ⇒ Object
Returns the value of attribute table_name.
5 6 7 |
# File 'lib/liquigen/create_table.rb', line 5 def table_name @table_name end |