Class: IRB::ExtendCommand::Foreground

Inherits:
MultiIRBCommand show all
Defined in:
lib/irb/cmd/subirb.rb

Instance Attribute Summary

Attributes inherited from Nop

#irb_context

Instance Method Summary collapse

Methods inherited from Nop

category, description, execute, #initialize

Constructor Details

This class inherits a constructor from IRB::ExtendCommand::Nop

Instance Method Details

#execute(key = nil) ⇒ Object



75
76
77
78
79
80
81
82
83
84
85
86
87
# File 'lib/irb/cmd/subirb.rb', line 75

def execute(key = nil)
  print_deprecated_warning

  if irb_context.with_debugger
    print_debugger_warning
    return
  end

  super

  raise CommandArgumentError.new("Please specify the id of target IRB job (listed in the `jobs` command).") unless key
  IRB.JobManager.switch(key)
end