Class/Module Index [+]

Quicksearch

YARD::Server::Commands::SearchCommand

Performs a search over the objects inside of a library and returns the results as HTML or plaintext

Attributes

query[RW]
results[RW]

Public Instance Methods

run() click to toggle source
# File lib/yard/server/commands/search_command.rb, line 13
def run
  Registry.load_all
  self.query = request.query['q']
  redirect("/#{adapter.router.docs_prefix}/#{single_library ? library : ''}") if query.nil? || query =~ /\A\s*\Z/
  if found = Registry.at(query)
    redirect(url_for(found))
  end
  search_for_object
  request.xhr? ? serve_xhr : serve_normal
end
visible_results() click to toggle source
# File lib/yard/server/commands/search_command.rb, line 24
def visible_results
  results[0, 10]
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.