2012-08-11 17:22:29 -07:00
|
|
|
class Pry
|
2012-12-25 23:35:17 +02:00
|
|
|
class Command::Reset < Pry::ClassCommand
|
|
|
|
match 'reset'
|
2012-08-11 18:26:59 -07:00
|
|
|
group 'Context'
|
2012-12-25 23:35:17 +02:00
|
|
|
description 'Reset the REPL to a clean state.'
|
2012-08-11 18:26:59 -07:00
|
|
|
|
2013-01-09 22:23:19 +02:00
|
|
|
banner <<-'BANNER'
|
|
|
|
Reset the REPL to a clean state.
|
|
|
|
BANNER
|
|
|
|
|
2012-08-11 18:26:59 -07:00
|
|
|
def process
|
2012-12-25 23:35:17 +02:00
|
|
|
output.puts 'Pry reset.'
|
|
|
|
exec 'pry'
|
2012-08-11 18:26:59 -07:00
|
|
|
end
|
2012-08-11 17:22:29 -07:00
|
|
|
end
|
2012-12-25 23:35:17 +02:00
|
|
|
|
|
|
|
Pry::Commands.add_command(Pry::Command::Reset)
|
2012-08-11 17:22:29 -07:00
|
|
|
end
|