在 Ruby 中重构 [英] Refactoring in Ruby

查看:48
本文介绍了在 Ruby 中重构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有支持 Ruby 或 RoR 重构的程序或 IDE?

Are there any programs or IDEs that support refactoring for Ruby or RoR?

推荐答案

最好的重构工具是良好的测试覆盖率.如果您的测试覆盖了您的代码并且它们都过去了,您可以进行任何您想要的更改,并且测试将找到您破坏的任何依赖项.这是基于 IDE 的重构工具在 Ruby 中不如其他地方流行的主要原因.

The best refactoring tool is good test coverage. If your tests cover your code and they all past you can just make whatever changes you want and the tests will find any dependencies you have broken. This is the main reason why IDE-based refactoring tools are less prevalent in Ruby than elsewhere.

这篇关于在 Ruby 中重构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆