Created
February 7, 2009 09:01
-
-
Save altamic/59837 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.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