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
Features
-
Syntax highlighting for Ruby objects
-
Does not change the inspect value
-
Support for generic objects, especially sets and enumerators
-
Comes with tests
-
Can be used without irb
-
Limited stdlib/gem objects support (e.g. Set, Gem::Requirement)
-
Supports 1.8, 1.9, jruby, rbx, head
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 lots of 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
-
Configure views for specific objects: hirb
-
Wirb is part of: irbtools
-
ripl is an irb alternative, syntax highlighting plugin (uses wirb by default): ripl-color_result
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