Class: Byebug::UpCommand
- Includes:
- Helpers::FrameHelper, Helpers::ParseHelper
- Defined in:
- lib/byebug/commands/up.rb
Overview
Move the current frame up in the backtrace.
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Helpers::ParseHelper
#get_int, #parse_steps, #syntax_valid?
Methods included from Helpers::FrameHelper
#jump_frames, #switch_to_frame
Methods inherited from Command
#arguments, columnize, #context, #frame, help, #initialize, match, to_s
Methods included from Helpers::StringHelper
#camelize, #deindent, #prettify
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
22 23 24 25 26 27 28 29 30 |
# File 'lib/byebug/commands/up.rb', line 22 def self.description <<-DESCRIPTION up[ count] #{short_description} Use the "bt" command to find out where you want to go. DESCRIPTION end |
.regexp ⇒ Object
18 19 20 |
# File 'lib/byebug/commands/up.rb', line 18 def self.regexp /^\s* up (?:\s+(\S+))? \s*$/x end |
.short_description ⇒ Object
32 33 34 |
# File 'lib/byebug/commands/up.rb', line 32 def self.short_description "Moves to a higher frame in the stack trace" end |
Instance Method Details
#execute ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/byebug/commands/up.rb', line 36 def execute pos, err = parse_steps(@match[1], "Up") return errmsg(err) unless pos jump_frames(pos) ListCommand.new(processor).execute if Setting[:autolist] end |