Is there something like bpython for Ruby?

不羁岁月 提交于 2019-12-03 05:47:10

问题


IRb is pretty plain compared to bpython, even when using wirble.

Is there any ruby equivalent of bpython?


回答1:


Use Pry: http://pry.github.com

It is written from scratch and let's you:

  • view method source code
  • view method documentation (not using RI so you dont have to pre-generate it)
  • pop in and out of different contexts
  • invoke at runtime, in any context
  • syntax highlighting
  • gist integration
  • view and replay history
  • open editors to edit method using edit-method obj.my_method syntax

A tonne more great and original features




回答2:


You can extend irb to achieve all of bpython's functionality and more with the right gems:

  • wirble: for syntax highlightning (as you already know)
  • bond: for more advanced autocompletion
  • utilitybelt: for pastebin-like commands
  • sketches: for editing and evaluating code easily
  • boson: command framework for creating libraries of commands to be loaded as needed
  • hirb: framework for associating views per class

For more gems, see here.



来源:https://stackoverflow.com/questions/2952793/is-there-something-like-bpython-for-ruby

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!