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.
568 569 570 571 |
# File 'lib/migration_defs.rb', line 568 def initialize(name) @name = name @option = RemoveIndexOption.new end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
566 567 568 |
# File 'lib/migration_defs.rb', line 566 def name @name end |
#option ⇒ Object
Returns the value of attribute option.
566 567 568 |
# File 'lib/migration_defs.rb', line 566 def option @option end |
Instance Method Details
#get_str ⇒ Object
578 579 580 |
# File 'lib/migration_defs.rb', line 578 def get_str return "remove_index :#{@name} #{@option.get_str}\n" end |
#parse_from_params(parse_params) ⇒ Object
573 574 575 576 |
# File 'lib/migration_defs.rb', line 573 def parse_from_params(parse_params) @option.set_option 'name', parse_params[:index_name] @option.set_option 'column', parse_params[:columns] end |