Class: Byebug::ThreadCommand::ResumeCommand
- Includes:
- Helpers::ThreadHelper
- Defined in:
- lib/byebug/commands/thread/resume.rb
Overview
Resumes the specified thread
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Helpers::ThreadHelper
#context_from_thread, #current_thread?, #display_context, #thread_arguments
Methods inherited from Command
#arguments, columnize, #context, #frame, help, #initialize, match, to_s
Methods included from Helpers::StringHelper
Constructor Details
This class inherits a constructor from Byebug::Command
Class Method Details
.description ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/byebug/commands/thread/resume.rb', line 18 def self.description <<-EOD th[read] r[esume] <thnum> #{short_description} EOD end |
.regexp ⇒ Object
14 15 16 |
# File 'lib/byebug/commands/thread/resume.rb', line 14 def self.regexp /^\s* r(?:esume)? (?: \s* (\d+))? \s*$/x end |
.short_description ⇒ Object
26 27 28 |
# File 'lib/byebug/commands/thread/resume.rb', line 26 def self.short_description 'Resumes execution of the specified thread' end |
Instance Method Details
#execute ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/byebug/commands/thread/resume.rb', line 30 def execute return puts(help) unless @match[1] context, err = context_from_thread(@match[1]) return errmsg(err) if err unless context.suspended? return errmsg(pr('thread.errors.already_running')) end context.resume display_context(context) end |