-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathirbrc
More file actions
37 lines (30 loc) · 638 Bytes
/
irbrc
File metadata and controls
37 lines (30 loc) · 638 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
32
33
34
35
36
37
# load libraries
require 'rubygems'
begin
require 'wirble'
require 'utility_belt'
# start wirble (with color)
Wirble.init
Wirble.colorize
rescue Exception
puts "Install wirble and utility_belt for added features"
end
# set simple prompt mode
IRB.conf[:PROMPT_MODE] = :SIMPLE
if defined?(RUBY_DESCRIPTION)
puts "# #{RUBY_DESCRIPTION}"
else
puts "# ruby #{RUBY_VERSION}"
end
def cls
system 'clear'
end
# Activate auto-completion.
require 'irb/completion'
# Add helper method to Object
module LocalMethods
def local_methods
self.methods.sort - Object.methods
end
end
Object.class_eval { include LocalMethods }