Skip to content

Instantly share code, notes, and snippets.

@altamic
Created February 7, 2009 09:01
Show Gist options
  • Save altamic/59837 to your computer and use it in GitHub Desktop.
Save altamic/59837 to your computer and use it in GitHub Desktop.
# ~/.irbrc file
# From http://giantrobots.thoughtbot.com/2008/12/23/script-console-tips
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
# Easily print methods local to an object's class
class Object
def local_methods
(methods - Object.instance_methods).sort
end
end
# vim-like quit
alias q exit
# Log to STDOUT if in Rails
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER')
require 'logger'
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT)
end
# auto indent
IRB.conf[:AUTO_INDENT]=true
# pretty printing
require 'pp'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment