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, #find, inherited, #initialize, load_commands, #match, method_missing, options, register_setting_get, register_setting_set, register_setting_var, settings, settings_map
Class Method Details
.help(cmd) ⇒ Object
95
96
97
98
99
|
# File 'lib/ruby-debug/commands/eval.rb', line 95
def help(cmd)
%{
pp expression\tevaluate expression and pretty-print its value
}
end
|
.help_command ⇒ Object
91
92
93
|
# File 'lib/ruby-debug/commands/eval.rb', line 91
def help_command
'pp'
end
|
Instance Method Details
#execute ⇒ Object
80
81
82
83
84
85
86
87
88
|
# File 'lib/ruby-debug/commands/eval.rb', line 80
def execute
out = StringIO.new
run_with_binding do |b|
PP.pp(debug_eval(@match.post_match, b), out)
end
print out.string
rescue
out.puts $!.message
end
|
#regexp ⇒ Object
76
77
78
|
# File 'lib/ruby-debug/commands/eval.rb', line 76
def regexp
/^\s*pp\s+/
end
|