| Class | Debugger::MethodSigCommand |
| In: |
cli/ruby-debug/commands/method.rb
|
| Parent: | Command |
Implements the debugger ‘method sig’ command.
# File cli/ruby-debug/commands/method.rb, line 34
34: def help(cmd)
35: %{
36: m[ethod] sig[nature] <obj>\tshow the signature of a method
37: }
38: end
# File cli/ruby-debug/commands/method.rb, line 16
16: def execute
17: obj = debug_eval('method(:%s)' % @match[1])
18: if obj.is_a?(Method)
19: begin
20: print "%s\n", obj.signature.to_s
21: rescue
22: errmsg("Can't get signature for '#{@match[1]}'\n")
23: end
24: else
25: errmsg("Can't make method out of '#{@match[1]}'\n")
26: end
27: end