Class: Arfy::MigrationBuilder::RenameColumn
- Inherits:
-
ColumnMigration
- Object
- GenericMigration
- ColumnMigration
- Arfy::MigrationBuilder::RenameColumn
- Includes:
- Reversible
- Defined in:
- lib/arfy/migration_builder/builders/rename_column.rb
Instance Method Summary collapse
-
#initialize(table, column_name, new_column_name) ⇒ RenameColumn
constructor
A new instance of RenameColumn.
- #vars_for_direction(direction) ⇒ Object
Methods inherited from GenericMigration
#code_for_template, #respond_to?
Constructor Details
#initialize(table, column_name, new_column_name) ⇒ RenameColumn
Returns a new instance of RenameColumn.
8 9 10 11 |
# File 'lib/arfy/migration_builder/builders/rename_column.rb', line 8 def initialize(table, column_name, new_column_name) super(table, column_name) @new_column_name = new_column_name end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Arfy::MigrationBuilder::ColumnMigration
Instance Method Details
#vars_for_direction(direction) ⇒ Object
13 14 15 16 17 |
# File 'lib/arfy/migration_builder/builders/rename_column.rb', line 13 def vars_for_direction(direction) vars = super vars[:new_column_name] = @new_column_name vars end |