Rather simple means of adding pretty output to irb
- Get the hirb gem
sudo gem install cldwalker-hirb --source http://gems.github.com
- Configure ~/.irbrc
require 'rubygems'
require 'hirb'
Hirb.enable
extend Hirb::Console
- Look at the output
>> Site.find(:first)
+----+-----------+-----------+-----------+-----------+-----------+
| id | name | domain | site_s... | create... | update... |
+----+-----------+-----------+-----------+-----------+-----------+
| 1 | Web Group | webgro... | 1 | 2007-0... | 2008-0... |
+----+-----------+-----------+-----------+-----------+-----------+
1 row in set
>>
This makes me happy. A prettier output for Ruby objects. For more information, see http://github.com/cldwalker/hirb/tree/master