Class: DbTransformer::Rules::Rename
- Inherits:
-
Object
- Object
- DbTransformer::Rules::Rename
- Defined in:
- lib/db_transformer/rules/rename.rb
Class Method Summary collapse
Class Method Details
.apply(mode, row, column, options) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/db_transformer/rules/rename.rb', line 5 def apply(mode, row, column, ) case mode when 'template' template(row, column, ['template']) end end |
.template(row, column, template) ⇒ Object
15 16 17 18 19 |
# File 'lib/db_transformer/rules/rename.rb', line 15 def template(row, column, template) row.tap do |t| t[column.to_sym] = template % row end end |