Ruby
Latest commit 692a2f7 Mar 18, 2017 @janlelis Release 2.1.1
Permalink
Failed to load latest commit information.
data/wirb Release 2.1.0 with new "ultra" color scheme Nov 8, 2016
lib Release 2.1.1 Mar 18, 2017
spec Delete old code Mar 18, 2017
.editorconfig add .editorconfig Jun 18, 2014
.gemtest rubygems-test support + rbx spec fix Feb 3, 2011
.gitignore support complex numbers Nov 30, 2012
.rspec add rspec file Nov 30, 2012
.travis.yml
CHANGELOG.md Prepare v2.1.1 release Mar 18, 2017
CODE_OF_CONDUCT.md Add Code of Conduct Feb 22, 2016
COPYING.txt Update license year Mar 9, 2017
Gemfile rbx stdlib pointers not needed anymore Mar 29, 2015
README.md Prepare v2.1.1 release Mar 18, 2017
Rakefile respect warnings to not have open-ended deps Jan 13, 2014
wirb.gemspec Relax paint dependency Mar 9, 2017

README.md

WIRB Interactive Ruby version

WIRB syntax highlights Ruby objects.

Supported Rubies: 2.4, 2.3, 2.2, 2.1, 2.0, jruby, rubinius.

Legacy Rubies (1.9, 1.8): Use WIRB 1.0

Example output

Features

  • Syntax highlighting for Ruby objects
  • No monkey patches anywhere
  • Support for generic objects, especially enumerators, and nested generic objects
  • Can be used without IRB
  • Supports stdlib objects, like Set
  • Custom color schemas via YAML

Install

Install the gem with:

$ gem install wirb

Usage

To start IRB with WIRB activated for one session, do:

$ irb -r wirb --inspect wirb

To activate WIRB permanently, you'll need to add this to the ~/.irbrc file:

require 'wirb'
Wirb.start

Bundled Schemas

These are the bundled color schemas. You can load one with Wirb.load_schema :name

  • :classic (default)
  • :colorless (only uses :bright, :underline and :inverse effect)
  • :ultra (matches the colorscheme from Ultra over in Clojure-land)

Usage with Rails

See the solution in this issue.

Kernel#wp

You can use WIRB like awesome_print to highlight any objects using wp:

require 'wirb/wp'
wp some_object

Also See

  • Gem that allows you to 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
  • More about terminal colors: Paint
  • Wirble: WIRB's predecessor

Credits

Copyright (c) 2011-2017 Jan Lelis http://janlelis.com see COPYING for details.

Influenced by code from: Copyright (C) 2006-2009 Paul Duncan pabs@pablotron.org

All contributors