RubyMine provides the following inline refactorings:
refactoring replaces redundant variable usage with its initializer.
This refactoring is opposite to
The variable must be initialized at declaration. If the initial value is modified somewhere in the code, only the occurrences before modification will be inlined.
- The Inline Method refactoring results in placing the method's body into the body of its caller(s); the method is deleted. This refactoring is opposite Extract Method.
- Place the caret in the editor at the desired symbol to be inlined.
- Do one of the following:
- On the main menu or on the context menu of the selection, choose .
- Press Ctrl+Alt+NCtrl+Alt+NCtrl+Alt+NCtrl+Alt+NCtrl+Alt+NCtrl+Alt+NCtrl+Alt+NShift+Alt+IAlt+⌘+NAlt ⌘ NAlt ⌘ NAlt ⌘ IAlt ⌘ N.
- In the Inline dialog, that corresponds to the selected symbol, specify the inlining options.
- Preview and apply changes.