1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

added Pry::Indent#indent_level method as as short-hand for stack[-1]

This commit is contained in:
John Mair 2011-10-09 06:48:17 +13:00
parent 6d77e577cb
commit 3ea75bb026

View file

@ -64,6 +64,12 @@ class Pry
@stack.clear
end
##
# The current indentation level (number of spaces deep)
def indent_level
@stack.last
end
##
# Indents a string and returns it. This string can either be a single line
# or multiple ones.