In Files

Methods

Included Modules

Files

Wirble

Wirble: A collection of useful Irb features.

To use, add the following to your ~/.irbrc:

require 'rubygems'
require 'wirble'
Wirble.init

If you want color in Irb, add this to your ~/.irbrc as well:

Wirble.colorize

Note: I spent a fair amount of time documenting this code in the README. If you've installed via RubyGems, root around your cache a little bit (or fire up gem_server) and read it before you tear your hair out sifting through the code below.

Constants

VERSION

Public Class Methods

colorize(custom_colors = nil) click to toggle source

Enable color results.

# File lib/wirble.rb, line 505
def self.colorize(custom_colors = nil)
  Colorize.enable(custom_colors)
end
init(opt = nil) click to toggle source

Load everything except color.

# File lib/wirble.rb, line 512
def self.init(opt = nil)
  # make sure opt isn't nil
  opt ||= {}

  # load internal irb/ruby features
  Internals.init(opt) unless opt && opt[:skip_internals]

  # load the history
  History.new(opt) unless opt && opt[:skip_history]

  # load shortcuts
  unless opt && opt[:skip_shortcuts]
    # load ri shortcuts
    RiShortcut.init

    # include common shortcuts
    Object.class_eval { include Shortcuts }
  end

  colorize(opt[:colors]) if opt && opt[:init_colors]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.