For the whole of May, I will blog about weird things in Ruby over at Idiosyncratic Ruby – Don’t miss it!
There are plenty terminal color gems out there. Now, there is one more. Why?
Somehow, I stumbled upon this useful little script by _why: Update
Hirb: “A mini view framework for console/irb that’s easy to use, even while under its influence. Console goodies include a no-wrap table, auto-pager, tree and menu.” now supports unicode in two ways:
│ Support for unicode full-width characters │ Unicode table characters instead of +/- chars │
Many people use irb with wirble. I also did.
I’ve been quite happy with it, but sometimes I noted that some symbols were displayed as : without the symbol name (e.g. in method name arrays) and that the representation of regexes looked quite strange.
This is why I’ve looked at the wirble tokenizer, fixed some bugs, liked it, extended it and created Wirb. These are the improvements:
- Use fancy colors! You can colorize the prompts, irb errors, stderr and stdout
- Output results as Ruby comments
- Enhance your output value using procs
Not everyone likes debuggers. I rather print the debug values myself – it works and I do not need to learn a debugger :P
The Zucker gem has gotten some new features. Installation is as easy as
gem install zucker
One of my favourite ways of learning something about existing code is to load it into irb and play around with it. You are able to ask every object in irb what it can do. It is as easy as you just asking for
public_methods and the object will show its abilities. But often you get spammed by
Object or irb methods that you rarely want to use.