Class: YARD::Server::Commands::LibraryIndexCommand

Inherits:
Base
  • Object
show all
Defined in:
lib/yard/server/commands/library_index_command.rb

Overview

Since:

  • 0.6.0

Instance Attribute Summary collapse

Attributes inherited from Base

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

Instance Method Summary collapse

Methods inherited from Base

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

Constructor Details

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

Instance Attribute Details

#optionsObject

Since:

  • 0.6.0



5
6
7
# File 'lib/yard/server/commands/library_index_command.rb', line 5

def options
  @options
end

Instance Method Details

#runObject

Since:

  • 0.6.0



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/yard/server/commands/library_index_command.rb', line 7

def run
  return unless path.empty?
  
  self.options = SymbolHash.new(false).update(
    :markup => :rdoc,
    :format => :html,
    :libraries => adapter.libraries,
    :adapter => adapter,
    :template => :doc_server,
    :type => :library_list
  )
  render
end