Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

wirb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wirb

  • 2.2.2
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

WIRB Interactive Ruby version

The WIRB gem syntax highlights Ruby objects. Works best as your default REPL inspector (see usage section below), but does not require IRB.

Supported Rubies: 3.0, 2.7, 2.6, 2.5

Older Rubies, should work: 2.4, 2.3, 2.2, 2.1, 2.0, rubinius

Ancient Rubies (1.9, 1.8): Please use WIRB 1.0

Features

  • Syntax highlighting for inspected Ruby objects
  • No monkey patches anywhere
  • Support for generic objects, especially enumerators, and nested generic objects
  • Supports common standard library objects, like Set
  • Color schemas customizable via YAML

Install

Install the gem with:

$ gem install wirb

Or add it to your Gemfile:

gem 'wirb'

Usage

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

$ irb -r wirb --inspect wirb

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

require 'wirb'
Wirb.start

Another way would be to use Irbtools, which activate WIRB automatically.

Kernel#wp

WIRB comes with a pretty printing utility (similar to awesome_print):

require 'wirb/wp'
wp some_object

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 (by @venantius, matches the colorscheme from Ultra over in Clojure-land)

Usage with Rails

If you run into problems using WIRB with Rails, try the solution in this issue.

Also See

  • Gem that allows you to configure views for specific objects: hirb
  • WIRB is part of: Irbtools
  • More about terminal colors: Paint

Credits

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

First tokenizer version was based on the wirble gem: Copyright (C) 2006-2009 Paul Duncan pabs@pablotron.org

All contributors

FAQs

Package last updated on 29 Dec 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc