4

I am looking for some tool that supports me in refactoring ruby code.

I know that it is very hard to implement these kind of tools for a dynamic language like ruby, but I also know there are different solutions for RubyMine and Vim to help with basic stuff like "extract method" and "rename method".

It does not seem very practical to have multiple editors / IDEs open, so I am searching something specifically for emacs.

1
  • I dare Commented Nov 6, 2012 at 15:59

2 Answers 2

2

There is a project called ruby-refactor with recent activity. It can be installed through MELPA. It was inspired by a plugin for Vim called vim-refactoring-ruby. It seems to work well upon my first impression.

Sign up to request clarification or add additional context in comments.

Comments

2

I don't know if this will be exactly what you looking for, but maybe you can take a look at Rdefs

Rdefs is a tiny Ruby script that extracts class, module, method, attribute definitions from a given Ruby source code.

Use Rdefs with Emacs

You might want to put etc/rdefs.el into your elisp directory and add something like this to your dot.emacs:

(require 'rvm)

(rvm-use-default)

(require 'rdefs)

Hope it helps a bit... but anyway there seem to be no alternatives at the moment.

You could also try and check Rsense status:

RSense is a Ruby development tools, which is specialized for high function text editors such as Emacs, Vim, etc. Following UNIX philosophy, RSense has a high transparency and is easy to learn, extend and fix for users. Adopting copyleft license, it also keeps being a free software.

In the future, the following features will be available:

Static code checking
Caller jump
Refactoring

But there has been no activity on the project github page for 1 year now (new branch for v 2.0)

Maybe you could try to get in contact with the author...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.