Class: Byebug::UpCommand

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

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



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

def description
  %{up[ count]\tmove to higher frame}
end

.namesObject



191
192
193
# File 'lib/byebug/commands/frame.rb', line 191

def names
  %w(up)
end

Instance Method Details

#executeObject



184
185
186
187
188
# File 'lib/byebug/commands/frame.rb', line 184

def execute
  pos = get_int(@match[1], 'Up')
  return unless pos
  adjust_frame(pos, false)
end

#regexpObject



180
181
182
# File 'lib/byebug/commands/frame.rb', line 180

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