Skip to content

Instantly share code, notes, and snippets.

@ajsharp
Created March 14, 2011 03:54
Show Gist options
  • Save ajsharp/868731 to your computer and use it in GitHub Desktop.
Save ajsharp/868731 to your computer and use it in GitHub Desktop.
# 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