Is there something like bpython for Ruby?
Asked Answered
M

2

21

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

Is there any ruby equivalent of bpython?

Microampere answered 1/6, 2010 at 19:45 Comment(2)
Sorry, I totally missed the wirble part of your question and replied about trying out wirble. I don't think that my post answers your question in any way so I have voted it for deletion.Curlpaper
@nas, no worries. Just an fyi: when you "vote" to delete your own answers, they are deleted immediately. I.e., I cannot see that you posted an answer here :)Brott
P
12

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

Parlando answered 28/4, 2011 at 1:52 Comment(0)
B
13

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.

Baltoslavic answered 1/6, 2010 at 21:14 Comment(2)
Ok, now someone should write a gem that pulls all these in and loads them nicely with irb. Any takers? :-)Sheeting
see this for your request, user83510: #3885215Tears
P
12

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

Parlando answered 28/4, 2011 at 1:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.