Class: MigrationDefs::RemoveIndexFunc
- Inherits:
-
AbstractMigrationClass
- Object
- AbstractMigrationClass
- MigrationDefs::RemoveIndexFunc
- Defined in:
- lib/migration_defs.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#option ⇒ Object
Returns the value of attribute option.
Instance Method Summary collapse
- #get_str ⇒ Object
-
#initialize(name) ⇒ RemoveIndexFunc
constructor
A new instance of RemoveIndexFunc.
- #parse_from_params(parse_params) ⇒ Object
Constructor Details
#initialize(name) ⇒ RemoveIndexFunc
Returns a new instance of RemoveIndexFunc.
569 570 571 572 |
# File 'lib/migration_defs.rb', line 569 def initialize(name) @name = name @option = RemoveIndexOption.new end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
567 568 569 |
# File 'lib/migration_defs.rb', line 567 def name @name end |
#option ⇒ Object
Returns the value of attribute option.
567 568 569 |
# File 'lib/migration_defs.rb', line 567 def option @option end |
Instance Method Details
#get_str ⇒ Object
579 580 581 |
# File 'lib/migration_defs.rb', line 579 def get_str return "remove_index :#{@name} #{@option.get_str}\n" end |
#parse_from_params(parse_params) ⇒ Object
574 575 576 577 |
# File 'lib/migration_defs.rb', line 574 def parse_from_params(parse_params) @option.set_option 'name', parse_params[:index_name] @option.set_option 'column', parse_params[:columns] end |