Skip to content

Instantly share code, notes, and snippets.

@jessor
Created December 23, 2010 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jessor/752961 to your computer and use it in GitHub Desktop.
Save jessor/752961 to your computer and use it in GitHub Desktop.
spiced up irb output, needs awesome_print
require "rubygems"
require "ap"
IRB::Irb.class_eval do
def output_value
ap @context.last_value,
:multiline => false,
:plain => false,
:indent => 2,
:color => {
:array => :white,
:bignum => :blue,
:class => :yellow,
:date => :greenish,
:falseclass => :red,
:fixnum => :blue,
:float => :blue,
:hash => :gray,
:nilclass => :red,
:string => :yellowish,
:symbol => :cyanish,
:time => :greenish,
:trueclass => :green
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment