Skip to content

Instantly share code, notes, and snippets.

@ematta
Last active October 11, 2015 23:57
Show Gist options
  • Save ematta/3939622 to your computer and use it in GitHub Desktop.
Save ematta/3939622 to your computer and use it in GitHub Desktop.
My .irbrc file
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