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