Class: Liquigen::Handlers::RenameTable
- Inherits:
-
Base
- Object
- Base
- Liquigen::Handlers::RenameTable
show all
- Defined in:
- lib/liquigen/handlers/rename_table.rb
Instance Attribute Summary
Attributes inherited from Base
#id, #props, #sets, #table
Instance Method Summary
collapse
Methods inherited from Base
#process
Constructor Details
Returns a new instance of RenameTable.
5
6
7
8
9
|
# File 'lib/liquigen/handlers/rename_table.rb', line 5
def initialize(props)
self.props = props
self.sets = []
self.id = build_id
end
|
Instance Method Details
#action_name ⇒ Object
11
12
13
|
# File 'lib/liquigen/handlers/rename_table.rb', line 11
def action_name
'RenameTable'
end
|
#build_one_changeset(set) ⇒ Object
21
22
23
24
25
26
27
|
# File 'lib/liquigen/handlers/rename_table.rb', line 21
def build_one_changeset(set)
props.each do |kv|
kv = kv.split(':')
change = Liquigen::RenameTable.new(kv[0], kv[1])
set.changes << change
end
end
|
#file_suffix ⇒ Object
15
16
17
18
19
|
# File 'lib/liquigen/handlers/rename_table.rb', line 15
def file_suffix
props.map do |item|
item.split(':')[0].camelize
end.join('And')
end
|