Wavy Interactive Ruby
Wirb colorizes your inspected Ruby objects. It is based on Wirble, but only provides and improves result highlighting.
Install
Install the gem with:
gem install wirb
Usage
Add to your ~/.irbrc
require 'rubygems' unless defined? Gem
require 'wirb'
Wirb.start
Improvements and fixed Wirble bugs
-
Does not change the inspect value (e.g. ranges with 4 instead of 3 dots)
-
Basic support for regexes
-
Fixes some symbol bugs (e.g. :+, :*, …)
-
Support for generic objects, especially sets and enumerators
-
Comes with tests
-
Can be used without irb
-
Supports 1.8, 1.9, jruby, rbx
Customize
The color schema can be changed with:
Wirb.schema = { :comma => :purple, ... }
Wirb color schemas are (almost) compatible with those from the original Wirble, but there are many extensions. Take a look at wirb/schema.rb or Wirb.schema
for a list of available token descriptions. See wirb/colors.rb or Wirb::COLORS
for the available colors.
Color schemas wanted! You’ve got a good looking alternative color schema? Please post it on the wiki, it may be bundled with a next version ;)
wp
You can colorize any object with wp
(wavy_print):
require 'wirb/wp'
wp some_object
wp some_object, :light_red
Also see
Credits
Copyright © 2011 Jan Lelis <rbjl.net>, see COPYING for details.
Contains code from (and thanks to)
-
Copyright © 2006-2009 Paul Duncan <[email protected]>
J-_-L