2012-08-11 20:22:29 -04:00
|
|
|
class Pry
|
2012-12-25 16:35:17 -05:00
|
|
|
class Command::BangPry < Pry::ClassCommand
|
|
|
|
match '!pry'
|
2012-08-11 21:26:59 -04:00
|
|
|
group 'Navigating Pry'
|
2013-01-09 15:23:19 -05:00
|
|
|
description 'Start a Pry session on current self.'
|
|
|
|
|
|
|
|
banner <<-'BANNER'
|
|
|
|
Start a Pry session on current self. Also works mid multi-line expression.
|
|
|
|
BANNER
|
2012-08-11 21:26:59 -04:00
|
|
|
|
|
|
|
def process
|
|
|
|
target.pry
|
|
|
|
end
|
2012-08-11 20:22:29 -04:00
|
|
|
end
|
2012-12-25 16:35:17 -05:00
|
|
|
|
|
|
|
Pry::Commands.add_command(Pry::Command::BangPry)
|
2012-08-11 20:22:29 -04:00
|
|
|
end
|