Ruby Extract Method
Sublime Text Plugin that allows you to perform the Extract Method refactoring in ruby code. Inspired by https://github.com/wesf90/rails-partial
- Total 785
- Win 276
- OS X 348
- Linux 161
|Mar 22||Mar 21||Mar 20||Mar 19||Mar 18||Mar 17||Mar 16||Mar 15||Mar 14||Mar 13||Mar 12||Mar 11||Mar 10||Mar 9||Mar 8||Mar 7||Mar 6||Mar 5||Mar 4||Mar 3||Mar 2||Mar 1||Feb 28||Feb 27||Feb 26||Feb 25||Feb 24||Feb 23||Feb 22||Feb 21||Feb 20||Feb 19||Feb 18||Feb 17||Feb 16||Feb 15||Feb 14||Feb 13||Feb 12||Feb 11||Feb 10||Feb 9||Feb 8||Feb 7||Feb 6|
Sublime Text 2 plugin: Ruby Extract Method
A lightweight plugin that creates a method from the highlighted text and saves it to your clipboard.
Windows / OSX / Linux:
ALT+M- Extract Method
How to perform the Extract Method refactoring in a Ruby file.
- Select the block of code you wish to put into a method and hit the Shortcut Key (
- Name the method
- Move your cursor to where you want to put the method, and hit
Shift+Ctrl+V(paste with indent)
Hint: You can also redefine
paste_with_indent, which will make this plugin a little more intuitive.
You have two options, the easier of which is to install this package through Package Control.
- Ensure Package Control is installed and Sublime Text 2 has been restarted.
- Open the Command Palette (Command+Shift+P on OS X, Control+Shift+P on Linux/Windows).
- Select “Package Control: Install Package”
- Select Ruby Extract Method when the list appears.
Congratulations! The package is now installed on your system.
$ git clone git://github.com/pashamur/ruby-extract-method.git RubyExtractMethod
Further instructions below.
Windows XP, 7 and 8
Execute the commands below one by one in your Command prompt.
$ cd "%APPDATA%\Sublime Text 2\Packages" $ git clone git://github.com/pashamur/ruby-extract-method.git "RubyExtractMethod"
Execute the commands below one by one in your terminal.
$ cd ~/.config/sublime-text-2/Packages/ $ git clone git://github.com/pashamur/ruby-extract-method.git RubyExtractMethod
The plugin does not currently support multiple selections. If you select more than one block, only the first one will be used in method creation.