Parent

Class/Module Index [+]

Quicksearch

YARD::Server::Commands::DisplayObjectCommand

Displays documentation for a specific object identified by the path

Public Instance Methods

index() click to toggle source
# File lib/yard/server/commands/display_object_command.rb, line 17
def index
  Registry.load_all

  title = options[:title]
  unless title
    title = "Documentation for #{library.name} #{library.version ? '(' + library.version + ')' : ''}"
  end
  options.update(
    :object => '_index.html',
    :objects => Registry.all(:module, :class),
    :title => title,
    :type => :layout
  )
  render
end
not_found() click to toggle source
# File lib/yard/server/commands/display_object_command.rb, line 33
def not_found
  super
  self.body = "Could not find object: #{object_path}"
end
run() click to toggle source
# File lib/yard/server/commands/display_object_command.rb, line 6
def run
  return index if path.empty?

  if object = Registry.at(object_path)
    options.update(:type => :layout)
    render(object)
  else
    self.status = 404
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.