RubyMine provides the following inline refactorings:
- The Inline Variable refactoring replaces redundant variable usage with its initializer. This refactoring is opposite to Extract Variable.
- 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.
| || |
| || |
Perform inline refactoring
- 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, choose .
- Press Ctrl+Alt+N.
- In the Inline Method that corresponds to the selected symbol, specify the inlining options. When inlining a variable, simply confirm the inline refactoring.
- Preview and apply changes.
Last modified: 30 May 2018