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

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

Overview

Returns the index of libraries served by the server.

Since:

  • 0.6.0

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

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

Instance Attribute Details

#optionsObject

Since:

  • 0.6.0


13
14
15
# File 'lib/yard/server/commands/library_index_command.rb', line 13

def options
  @options
end

Instance Method Details

#runObject

Since:

  • 0.6.0


15
16
17
18
19
20
21
22
23
# File 'lib/yard/server/commands/library_index_command.rb', line 15

def run
  return unless path.empty?

  self.options = LibraryIndexOptions.new
  self.options.adapter = adapter
  self.options.libraries = adapter.libraries
  self.options.reset_defaults
  render
end