Class: YARD::Server::Commands::ListCommand

Inherits:
LibraryCommand show all
Includes:
Templates::Helpers::BaseHelper
Defined in:
lib/yard/server/commands/list_command.rb

Overview

Returns a list of objects of a specific type

Since:

  • 0.6.0

Instance Attribute Summary

Attributes included from Templates::Helpers::BaseHelper

#object, #serializer

Attributes inherited from LibraryCommand

#incremental, #library, #options, #serializer, #single_library

Attributes inherited from Base

#adapter, #body, #caching, #command_options, #headers, #path, #request, #status

Instance Method Summary collapse

Methods included from Templates::Helpers::BaseHelper

#format_object_title, #format_object_type, #format_source, #format_types, #globals, #h, #link_file, #link_include_file, #link_include_object, #link_object, #link_url, #linkify, #run_verifier

Methods inherited from LibraryCommand

#call, #initialize

Methods inherited from Base

#cache, #call, #initialize, #not_found, #redirect, #render

Constructor Details

This class inherits a constructor from YARD::Server::Commands::LibraryCommand

Instance Method Details

#itemsObject

Raises:

  • (NotImplementedError)

Since:

  • 0.6.0



8
# File 'lib/yard/server/commands/list_command.rb', line 8

def items; raise NotImplementedError end

#runObject

Since:

  • 0.6.0



11
12
13
14
15
# File 'lib/yard/server/commands/list_command.rb', line 11

def run
  options.update(:items => items, :template => :doc_server,
                 :list_type => request.path.split('/').last, :type => :full_list)
  render
end

#typeObject

Raises:

  • (NotImplementedError)

Since:

  • 0.6.0



9
# File 'lib/yard/server/commands/list_command.rb', line 9

def type; raise NotImplementedError end