This post is part of a series which documents the vim-ruby-refactoring plugin.
IMPORTANT: As well as installing the vim-ruby-refactoring plugin, you must also install the matchit.vim plugin for this refactoring to work.
Extract Method
Extracts a selection into a method and places it above the current method.
The refactoring: http://www.refactoring.com/catalog/extractMethod.html
Example
Before refactoring:
Visually select lines you wish to extract
Hit your **
After refactoring:
A new method print_details has been added above the print_owing method containing the contents of the selected lines.
rem is the default binding for this refactoring, think Refactor Extract Method.