Class Debugger::MethodSigCommand
In: cli/ruby-debug/commands/method.rb
Parent: Command

Implements the debugger ‘method sig’ command.

Methods

execute   help   help_command   regexp  

Public Class methods

[Source]

    # 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

[Source]

    # File cli/ruby-debug/commands/method.rb, line 30
30:       def help_command
31:         'method'
32:       end

Public Instance methods

[Source]

    # 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

[Source]

    # File cli/ruby-debug/commands/method.rb, line 12
12:     def regexp
13:       /^\s*m(?:ethod)?\s+sig(?:nature)?\s+(\S+)\s*$/
14:     end

[Validate]