-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathirbrc
More file actions
32 lines (26 loc) · 678 Bytes
/
irbrc
File metadata and controls
32 lines (26 loc) · 678 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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'
require 'pp'
require 'rubygems'
require 'wirble'
Wirble.init
Wirble.colorize
# Indent
IRB.conf[:AUTO_INDENT] = true
# 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
end