Created
March 14, 2011 03:54
-
-
Save ajsharp/868731 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
# require 'rubygems' | |
['wirble-0.1.3', 'awesome_print-0.2.1'].each do |g| | |
$:.unshift("/usr/local/lib/ruby/gems/1.8/gems/#{g}/lib") | |
end | |
require 'ap' | |
require 'wirble' | |
Wirble.init | |
Wirble.colorize | |
# print SQL to STDOUT | |
if ENV.include?('RAILS_ENV') && !Object.const_defined?('RAILS_DEFAULT_LOGGER') | |
require 'logger' | |
RAILS_DEFAULT_LOGGER = Logger.new(STDOUT) | |
end | |
# Autocomplete | |
require 'irb/completion' | |
# Prompt behavior | |
ARGV.concat [ "--readline", "--prompt-mode", "simple" ] | |
# History | |
require 'irb/ext/save-history' | |
IRB.conf[:SAVE_HISTORY] = 100 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" | |
# Easily print methods local to an object's class | |
class Object | |
def local_methods | |
(methods - Object.instance_methods).sort | |
end | |
def unique_methods | |
methods - 1.methods | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment