Class: 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.
-
#caching ⇒ Boolean
inherited
from Base
Whether to cache.
-
#command_options ⇒ Hash
inherited
from Base
The options passed to the command's constructor.
Attributes Set Per Request collapse
-
#body ⇒ String
inherited
from Base
The response body.
-
#headers ⇒ Hash{String => String}
inherited
from Base
Response headers.
-
#path ⇒ String
inherited
from Base
The path after the command base URI.
-
#request ⇒ Request
inherited
from Base
Request object.
-
#status ⇒ Numeric
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
#body ⇒ String Originally defined in class Base
Returns the response body. Defaults to empty string.
#caching ⇒ Boolean Originally defined in class Base
Returns whether to cache
#command_options ⇒ Hash Originally defined in class Base
Returns the options passed to the command's constructor
#options ⇒ Object
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
#status ⇒ Numeric Originally defined in class Base
Returns status code. Defaults to 200 per request
Instance Method Details
#run ⇒ Object
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 |