Module Wirble
In: lib/wirble.rb
History Shortcuts lib/wirble.rb Shortcuts Color Tokenizer Colorize RiShortcut Internals Wirble dot/m_0_0.png

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.

Methods

colorize   init  

Included Modules

Shortcuts

Classes and Modules

Module Wirble::Colorize
Module Wirble::Internals
Module Wirble::RiShortcut
Module Wirble::Shortcuts
Class Wirble::History

Constants

VERSION = '0.1.3'

Public Class methods

Enable color results.

[Source]

     # File lib/wirble.rb, line 505
505:   def self.colorize(custom_colors = nil)
506:     Colorize.enable(custom_colors)
507:   end

Load everything except color.

[Source]

     # File lib/wirble.rb, line 512
512:   def self.init(opt = nil)
513:     # make sure opt isn't nil
514:     opt ||= {}
515: 
516:     # load internal irb/ruby features
517:     Internals.init(opt) unless opt && opt[:skip_internals]
518: 
519:     # load the history
520:     History.new(opt) unless opt && opt[:skip_history]
521: 
522:     # load shortcuts
523:     unless opt && opt[:skip_shortcuts]
524:       # load ri shortcuts
525:       RiShortcut.init
526: 
527:       # include common shortcuts
528:       Object.class_eval { include Shortcuts }
529:     end
530: 
531:     colorize(opt[:colors]) if opt && opt[:init_colors]
532:   end

[Validate]