Class: Debugger::PPCommand
- Inherits:
-
Command
- Object
- SimpleDelegator
- Command
- Debugger::PPCommand
show all
- Defined in:
- lib/ruby-debug-ide/commands/eval.rb
Overview
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
Class Method Details
.help(cmd) ⇒ Object
57
58
59
60
61
|
# File 'lib/ruby-debug-ide/commands/eval.rb', line 57
def help(cmd)
%{
pp expression\tevaluate expression and print its value
}
end
|
.help_command ⇒ Object
53
54
55
|
# File 'lib/ruby-debug-ide/commands/eval.rb', line 53
def help_command
'pp'
end
|
Instance Method Details
#execute ⇒ Object
45
46
47
48
49
50
|
# File 'lib/ruby-debug-ide/commands/eval.rb', line 45
def execute
exp = @match.post_match
out = StringIO.new
PP.pp(debug_eval(exp), out) rescue out.puts $!.message
print_pp out.string
end
|
#regexp ⇒ Object
41
42
43
|
# File 'lib/ruby-debug-ide/commands/eval.rb', line 41
def regexp
/^\s*pp\s+/
end
|