Class: Debugger::FinishCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug-ide/commands/stepping.rb

Overview

:nodoc:

Constant Summary

Constants inherited from Command

Command::DEF_OPTIONS

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Command

commands, file_filter_supported?, #find, inherited, #initialize, load_commands, #match, method_missing, options, unescape_incoming

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



79
80
81
82
83
# File 'lib/ruby-debug-ide/commands/stepping.rb', line 79

def help(cmd)
  %{
    fin[ish]\treturn to outer frame
  }
end

.help_commandObject



75
76
77
# File 'lib/ruby-debug-ide/commands/stepping.rb', line 75

def help_command
  'finish'
end

Instance Method Details

#executeObject



64
65
66
67
68
69
70
71
72
# File 'lib/ruby-debug-ide/commands/stepping.rb', line 64

def execute
  if @state.frame_pos == @state.context.stack_size - 1
    print_msg "\"finish\" not meaningful in the outermost frame."
  else
    @state.context.stop_frame = @state.frame_pos
    @state.frame_pos = 0
    @state.proceed
  end
end

#regexpObject



60
61
62
# File 'lib/ruby-debug-ide/commands/stepping.rb', line 60

def regexp
  /^\s*fin(?:ish)?$/
end