Class: Debugger::IRBCommand
Overview
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
Class Method Details
.help(cmd) ⇒ Object
52
53
54
55
56
|
# File 'lib/ruby-debug/commands/irb.rb', line 52
def help(cmd)
%{
irb\tstarts an IRB session. (EXPERIMENTAL)
}
end
|
.help_command ⇒ Object
48
49
50
|
# File 'lib/ruby-debug/commands/irb.rb', line 48
def help_command
'irb'
end
|
Instance Method Details
#execute ⇒ Object
35
36
37
38
39
40
41
42
43
44
45
|
# 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
unless @state.binding
print "Can't evaluate in the current context.\n"
throw :debug_error
end
IRB.start_session(@state.binding)
end
|
#regexp ⇒ Object
31
32
33
|
# File 'lib/ruby-debug/commands/irb.rb', line 31
def regexp
/^irb$/
end
|