Class: Byebug::DownCommand

Inherits:
Command
  • Object
show all
Includes:
FrameFunctions
Defined in:
lib/byebug/commands/frame.rb

Overview

Move the current frame down in the backtrace.

Class Method Summary collapse

Instance Method Summary collapse

Methods included from FrameFunctions

#adjust_frame, #get_pr_arguments, #navigate_to_frame, #switch_to_frame

Methods inherited from Command

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

Methods included from StringFunctions

#camelize, #prettify

Methods included from FileFunctions

#get_line, #get_lines, #n_lines, #normalize

Methods included from ParseFunctions

#get_int, #parse_steps, #syntax_valid?

Constructor Details

This class inherits a constructor from Byebug::Command

Class Method Details

.descriptionObject



162
163
164
165
166
# File 'lib/byebug/commands/frame.rb', line 162

def description
  prettify <<-EOD
    down[ count] Move to lower frame.
  EOD
end

.namesObject



158
159
160
# File 'lib/byebug/commands/frame.rb', line 158

def names
  %w(down)
end

Instance Method Details

#executeObject



150
151
152
153
154
155
# File 'lib/byebug/commands/frame.rb', line 150

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

  adjust_frame(-pos, false)
end

#regexpObject



146
147
148
# File 'lib/byebug/commands/frame.rb', line 146

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