Skip to content

Instantly share code, notes, and snippets.

@kevincolyar
Created July 19, 2010 23:26
Show Gist options
  • Save kevincolyar/482211 to your computer and use it in GitHub Desktop.
Save kevincolyar/482211 to your computer and use it in GitHub Desktop.
# Color Coding
# http://www.alloycode.com/2010/6/26/automatic-color-coding-for-script-console-and-irb
begin
require "ap"
IRB::Irb.class_eval do
def output_value
ap @context.last_value
end
end
rescue LoadError => e
puts "ap gem not found. Try typing 'gem install awesome_print' to get super-fancy output."
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment