Class: Liquigen::CreateIndex

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(table_name) ⇒ CreateIndex

Returns a new instance of CreateIndex.



9
10
11
12
13
# File 'lib/liquigen/create_index.rb', line 9

def initialize(table_name)
  self.table_name = table_name&.underscore&.pluralize
  self.index_name = ''
  self.columns = []
end

Instance Attribute Details

#columnsObject

Returns the value of attribute columns.



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

def columns
  @columns
end

#index_nameObject

Returns the value of attribute index_name.



6
7
8
# File 'lib/liquigen/create_index.rb', line 6

def index_name
  @index_name
end

#table_nameObject

Returns the value of attribute table_name.



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

def table_name
  @table_name
end