wavy interactive ruby (because colors are great)
Ruby
Pull request Compare This branch is 1 commit ahead, 132 commits behind janlelis:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
spec
.gemtest
.gitignore
.travis.yml
CHANGELOG.rdoc
COPYING.txt
Gemfile
Gemfile.lock
README.rdoc
Rakefile
wirb.gemspec

README.rdoc

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 and how to create your own. Wirb uses rainbow for color and supports 256-color terminals.

For support on Windows, you should install the following gems:

gem install windows-pr win32console

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 (C) 2006-2009 Paul Duncan <pabs@pablotron.org>

J-_-L