Last active
October 11, 2015 23:57
-
-
Save ematta/3939622 to your computer and use it in GitHub Desktop.
My .irbrc file
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 'irb/completion' | |
require 'irb/ext/save-history' | |
require 'map_by_method' | |
require 'what_methods' | |
require 'pp' | |
IRB.conf[:AUTO_INDENT] = true | |
IRB.conf[:SAVE_HISTORY] = 100 | |
IRB.conf[:HISTORY_FILE] = "#{ENV['HOME']}/.irb-save-history" #FOR WINDOWS CHANGE HOME TO HOMEPATH | |
def clear | |
system('clear') | |
end | |
def cls | |
system('cls') | |
end | |
class Object | |
def local_methods(obj = self) | |
(obj.methods - obj.class.superclass.instance_methods).sort | |
end | |
end | |
puts '.irbrc successfully loaded' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment