Class: Byebug::UpCommand

Inherits:
Command show all
Defined in:
lib/byebug/commands/frame.rb

Overview

Move the current frame up in the backtrace.

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, find, format_subcmd, format_subcmds, help, inherited, #initialize, load_commands, #match

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



204
205
206
# File 'lib/byebug/commands/frame.rb', line 204

def description
  %(up[ count]        Move to higher frame.)
end

.namesObject



200
201
202
# File 'lib/byebug/commands/frame.rb', line 200

def names
  %w(up)
end

Instance Method Details

#executeObject



192
193
194
195
196
197
# File 'lib/byebug/commands/frame.rb', line 192

def execute
  pos, err = parse_steps(@match[1], 'Up')
  return errmsg(err) unless pos

  adjust_frame(pos, false)
end

#regexpObject



188
189
190
# File 'lib/byebug/commands/frame.rb', line 188

def regexp
  /^\s* u(?:p)? (?:\s+(\S+))? \s*$/x
end