Class: Liquigen::CreateTable

Inherits:
Change
  • Object
show all
Defined in:
lib/liquigen/create_table.rb

Direct Known Subclasses

Handlers::AddColumn, Handlers::AddIndex

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#columnsObject

Returns the value of attribute columns.



7
8
9
# File 'lib/liquigen/create_table.rb', line 7

def columns
  @columns
end

#table_nameObject

Returns the value of attribute table_name.



5
6
7
# File 'lib/liquigen/create_table.rb', line 5

def table_name
  @table_name
end