123456789_123456789_123456789_123456789_123456789_

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

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Base
Instance Chain:
self, Base
Inherits: YARD::Server::Commands::Base
Defined in: lib/yard/server/commands/library_index_command.rb

Overview

Returns the index of libraries served by the server.

Since:

  • 0.6.0

Class Method Summary

Base - Inherited

.new

Creates a new command object, setting attributes named by keys in the options hash.

Instance Attribute Summary

Instance Method Summary

Base - Inherited

#call

The main method called by a router with a request object.

#run

Subclass this method to implement a custom command.

#add_cache_control

Add a conservative cache control policy to reduce load on requests served with "?1234567890" style timestamp query strings.

Constructor Details

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

Instance Attribute Details

#options (rw)

Since:

  • 0.6.0

[ GitHub ]

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

attr_accessor :options

Instance Method Details

#run

Since:

  • 0.6.0

[ GitHub ]

  
# File 'lib/yard/server/commands/library_index_command.rb', line 16

def run
  return unless path.empty?

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