ror-refactor
A set of refactoring tools for Ruby On Rails
zedtux 1,229 4 0.3.1 MIT GitHub

Ruby On Rails Refactor package

A set of refactoring tools for Ruby On Rails. It should ease your life.

Build Status

Refactoring tools

This lists the available refactoring tools installed by this package:

  • Extract Method (Move a piece of code in a new method)
  • Extract Line (Move a piece of code line in a new method)
  • Extract Service (Move methods in a new Class)

Installation

You can install it from the console with:

$ apm install ror-refactor

Or from Atom itself.

Usage

Extract Method

Select a bunch of code then hit CTRL + ALT + CMD + R:

ror-refactor-extract-method

Extract Line

Select a piece of code line then hit CTRL + ALT + CMD + R:

ror-refactor-extract-line

Extract Service

Select a bunch of methods to move in a new class then hit CTRL + ALT + CMD + R:

ror-refactor-extract-service

You can specify the following options:

ror-refactor-extract-service-options

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request