Refactoring is the process of modifying source code in order to make it easier to maintain and extend, but without changing its behavior. RubyMine supports various refactoring operations for different programming languages. This topic mostly covers refactorings available for Ruby.
Select an item to refactor. You can select a file/folder in the Project tool window or expression/symbol in the editor.
Press Ctrl+Shift+Alt+T to open a list of refactorings that can be selected. Alternatively, you can use a keyboard shortcut for a specific refactoring.
If you need to undo your refactoring, pressCtrl+Z.
Preview refactoring changes
For some refactorings, RubyMine lets you preview changes before applying them.
To see potential changes, click Preview in the Refactoring Preview dialog.
Check the changes that are going to be made in the Find tool window. You can exclude Delete or remove Ctrl+X changes that you consider unnecessary.
Click Do Refactor to proceed with the changes.
Configure refactoring settings
Refactorings supported in RubyMine
|Move and Copy Refactorings|| || F6|
|Pull Members Up, Push Members Down|| |
|Extract Include File|