class Pry::Command::FindMethod

Public Instance Methods

options(opt) click to toggle source
# File lib/pry/commands/find_method.rb, line 27
def options(opt)
  opt.on :n, :name,    "Search for a method by name"
  opt.on :c, :content, "Search for a method based on content in Regex form"
end
process() click to toggle source
# File lib/pry/commands/find_method.rb, line 32
def process
  return if args.size < 1
  klass = search_class

  matches = if opts.content?
    content_search(klass)
  else
    name_search(klass)
  end

  show_search_results(matches)
end