[...] Also a command to take the selected text, add ".inspect # =>" and push it to the clipboard.
Have a look at Ruby -> Execute Line as Ruby (ctrl-shift E, which is unscoped, so it works in all contexts).
It will execute the current line or selection via Ruby and insert the result (either using .to_s or .inspect, depending on the result type).
Yeah, but the script I linked to actually runs the program and gives you (almost) real-time debugging while you're editing the file. Do you have any good ruby one-liners that you use a lot? ___________________ Ben Jackson Diretor de Desenvolvimento
ben@incomumdesign.com http://www.incomumdesign.com
On 24/11/2005, at 13:12, Benjamin Jackson wrote:
[...] It will execute the current line or selection via Ruby and insert the result (either using .to_s or .inspect, depending on the result type).
Yeah, but the script I linked to actually runs the program and gives you (almost) real-time debugging while you're editing the file.
Yes, it was only meant for the latter part. Btw: DHH told me he was using the Web Preview with Filter Through… some (ruby) script that ran his stuff, to give realtime debugging. In many cases, I presume just providing “ruby” as the filter, will work (as long as the script output useful info).
Do you have any good ruby one-liners that you use a lot?
I mostly use ctrl-shift E to do math (since it's a menu choice shorter than using the math bundle).