Sha256: 14a9173bdf055a0ecfac7b0fe467aeb4512d50f07b8025a494bac800b91876b3
Contents?: true
Size: 706 Bytes
Versions: 253
Compression:
Stored size: 706 Bytes
Contents
class Pry class Command::ExitAll < Pry::ClassCommand match 'exit-all' group 'Navigating Pry' description 'End the current Pry session.' banner <<-'BANNER' Usage: exit-all [--help] Aliases: !!@ End the current Pry session (popping all bindings and returning to caller). Accepts optional return value. BANNER def process # calculate user-given value exit_value = target.eval(arg_string) # clear the binding stack _pry_.binding_stack.clear # break out of the repl loop throw(:breakout, exit_value) end end Pry::Commands.add_command(Pry::Command::ExitAll) Pry::Commands.alias_command '!!@', 'exit-all' end
Version data entries
253 entries across 246 versions & 44 rubygems