开发者

Is there something like bpython for Ruby?

开发者 https://www.devze.com 2023-01-01 15:18 出处:网络
IRb is pretty plain compared to bpython, even when using wi开发者_StackOverflow中文版rble. Is there any ruby equivalent of bpython?You can extend irb to achieve all of bpython\'s functionality and mo

IRb is pretty plain compared to bpython, even when using wi开发者_StackOverflow中文版rble.

Is there any ruby equivalent of bpython?


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号