Created
April 2, 2010 18:35
-
-
Save ermaker/353518 to your computer and use it in GitHub Desktop.
.irbenv.rb
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
def safe_require *args | |
begin | |
require *args | |
yield if block_given? | |
rescue LoadError => e | |
warn e | |
end | |
end | |
IRB.conf[:PROMPT_MODE] = :SIMPLE | |
IRB.conf[:AUTO_INDENT] = true | |
safe_require 'rubygems' | |
safe_require 'map_by_method' | |
safe_require 'what_methods' | |
safe_require 'pp' | |
safe_require 'wirble' do | |
Wirble.init | |
Wirble.colorize | |
end | |
class Object | |
def local_methods obj=self | |
(obj.methods - obj.class.superclass.instance_methods).sort | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment