-
Notifications
You must be signed in to change notification settings - Fork 0
/
pryrc
30 lines (26 loc) · 797 Bytes
/
pryrc
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
# vim: set filetype ft=ruby
begin
require 'pry-byebug'
require 'pry-coolline'
require 'pry-stack_explorer'
Pry.config.prompt = [ proc { ">> " }, proc { ">? " } ]
Pry.commands.alias_command 'c', 'continue'
Pry.commands.alias_command 's', 'step'
Pry.commands.alias_command 'n', 'next'
Pry.commands.alias_command 'f', 'finish'
rescue LoadError
end
class Object
def interesting_methods
case self.class
when Class
self.public_methods.sort - Object.public_methods
when Module
self.public_methods.sort - Module.public_methods
else
self.public_methods.sort - Object.new.public_methods
end
end
end
# loading rails configuration if it is running as a rails console
# load File.dirname(__FILE__) + '/.pryrc_rails' if defined?(Rails) && Rails.env