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