Class: YARD::Server::Commands::LibraryIndexCommand
- Inherits:
-
Base
- Object
- Base
- YARD::Server::Commands::LibraryIndexCommand
- Defined in:
- lib/yard/server/commands/library_index_command.rb
Overview
Returns the index of libraries served by the server.
Basic Command and Adapter Options (collapse)
-
- (Adapter) adapter
inherited
from Base
The server adapter.
-
- (Boolean) caching
inherited
from Base
Whether to cache.
-
- (Hash) command_options
inherited
from Base
The options passed to the command's constructor.
Attributes Set Per Request (collapse)
-
- (String) body
inherited
from Base
The response body.
-
- (Hash{String => String}) headers
inherited
from Base
Response headers.
-
- (String) path
inherited
from Base
The path after the command base URI.
-
- (Request) request
inherited
from Base
Request object.
-
- (Numeric) status
inherited
from Base
Status code.
Instance Attribute Summary (collapse)
Instance Method Summary (collapse)
Constructor Details
This class inherits a constructor from YARD::Server::Commands::Base
Instance Attribute Details
- (String) body Originally defined in class Base
Returns the response body. Defaults to empty string.
- (Boolean) caching Originally defined in class Base
Returns whether to cache
- (Hash) command_options Originally defined in class Base
Returns the options passed to the command’s constructor
- (Object) options
6 7 8 |
# File 'lib/yard/server/commands/library_index_command.rb', line 6 def @options end |
- (Request) request Originally defined in class Base
Returns request object
- (Numeric) status Originally defined in class Base
Returns status code. Defaults to 200 per request
Instance Method Details
- (Object) run
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/yard/server/commands/library_index_command.rb', line 8 def run return unless path.empty? self. = SymbolHash.new(false).update( :markup => :rdoc, :format => :html, :libraries => adapter.libraries, :adapter => adapter, :template => :doc_server, :type => :library_list ) render end |