What’s mining: inline local refactoring
You’ve probably got used to utilizing the power of RubyMine’s refactorings, have you?
One of the cool refactorings we have in RubyMine is ‘Introduce variable’ that lets you quickly create variable from a statement and replace all similar occurrences in the code.
Right now we are adding the reverse thing: inline local refactoring.
Here is the slide-cast showing it in action.
Step 1: Place caret on a variable you want to inline and select Refactor | Inline… from the main menu or context menu. Or, even better, learn the keyboard shortcut.
Step 2: Confirm your action.
Result: Your code is updated
This new refactoring will be available in the next RubyMine EAP build. You can download the latest build now and try other new refactorings we’ve been adding lately.
BTW, have you pre-ordered the “Refactoring: Ruby Edition” book already? Should be a good one.
Ruby can be refactored!
For the screenshots and my refactoring tests I use excellent ‘Greed’ project created by Jim Weirich and Joe O’Brien for their “Testing, Design, and Refactoring” tutorial during RailsConf 2009. Thanks guys!
Subscribe to Blog updates
RubyMine 2024.1 Early Access Program is Open!
The RubyMine 2024.1 Early Access Program has now started! In this blog post, we’ll share our plans for the upcoming release and the areas we’re currently focusing on. The first EAP build includes performance and usability improvements, bug fixes, and updates to RBS language support.Now, you c…
RubyMine 2023.3 EAP Update
Hello everyone! We’re back with an update on the state of the 2023.3 Early Access Program. You can download the latest EAP build from our website, via the free Toolbox App, or by using snaps for Ubuntu. Here are the biggest highlights of this release: Performance improvements As we me…
The RubyMine 2023.3 Early Access Program Is Open!
Hello everyone, The third RubyMine Early Access Program of 2023 is underway! The key change in the first EAP build is an important indexing optimization. By refactoring our code base, we’ve doubled RubyMine’s indexing speed compared to v2023.1. This is particularly noticeable when working…
Performance Improvements in RubyMine 2023.1
Hello everybody, The new release is fast approaching, so it’s time to unveil the performance enhancements you can expect from RubyMine 2023.1. Faster code completion When developing and supporting RubyMine, we analyze a great load of anonymized usage data. A lot of recent data pointed to the fact t…