From a73529bacfdda7a6986ebcec01d04b3afd52c79d Mon Sep 17 00:00:00 2001 From: John Mair Date: Sun, 9 Oct 2011 06:21:26 +1300 Subject: [PATCH] added Pry::Indent#reset method to clear out indentation levels and reset the stack --- lib/pry/indent.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pry/indent.rb b/lib/pry/indent.rb index 4de24b01..dea88d30 100644 --- a/lib/pry/indent.rb +++ b/lib/pry/indent.rb @@ -58,6 +58,12 @@ class Pry @stack = [] end + ## + # Get rid of all indentation + def reset + @stack.clear + end + ## # Indents a string and returns it. This string can either be a single line # or multiple ones.