Class: Debugger::IRBCommand

Inherits:
Command
  • Object
show all
Defined in:
lib/ruby-debug/commands/irb.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, inherited, #initialize, load_commands, #match, method_missing, options

Constructor Details

This class inherits a constructor from Debugger::Command

Class Method Details

.help(cmd) ⇒ Object



48
49
50
51
52
# File 'lib/ruby-debug/commands/irb.rb', line 48

def help(cmd)
  %{
    irb\tstarts an IRB session. (EXPERIMENTAL)
  }
end

.help_commandObject



44
45
46
# File 'lib/ruby-debug/commands/irb.rb', line 44

def help_command
  'irb'
end

Instance Method Details

#executeObject



35
36
37
38
39
40
41
# File 'lib/ruby-debug/commands/irb.rb', line 35

def execute
  unless @state.interface.kind_of?(LocalInterface)
    print "Command is available only in local mode.\n"
    throw :debug_error
  end
  IRB.start_session(get_binding)
end

#regexpObject



31
32
33
# File 'lib/ruby-debug/commands/irb.rb', line 31

def regexp
  /^irb$/
end