Parent

Debugger::MethodSigCommand

Implements the debugger ‘method sig’ command.

Public Class Methods

help(cmd) click to toggle source
# File lib/ruby-debug/commands/method.rb, line 34
def help(cmd)
  %{
    m[ethod] sig[nature] <obj>\tshow the signature of a method
  }
end
help_command() click to toggle source
# File lib/ruby-debug/commands/method.rb, line 30
def help_command
  'method'
end

Public Instance Methods

execute() click to toggle source
# File lib/ruby-debug/commands/method.rb, line 16
def execute
  obj = debug_eval('method(:%s)' % @match[1])
  if obj.is_a?(Method)
    begin
      print "%s\n", obj.signature.to_s
    rescue
      errmsg("Can't get signature for '#{@match[1]}'\n")
    end
  else
    errmsg("Can't make method out of '#{@match[1]}'\n")
  end
end
regexp() click to toggle source
# File lib/ruby-debug/commands/method.rb, line 12
def regexp
  /^\s*m(?:ethod)?\s+sig(?:nature)?\s+(\S+)\s*$/
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.