class YARD::Server::Adapter
def initialize(libs, opts = {}, server_opts = {})
(**opts)
-
:single_library
(Boolean
) -- whether to server documentation -
:caching
(Boolean
) -- whether or not caching is enabled -
:router
(Class
) -- the router class to initialize as the
Parameters:
-
opts
(Hash
) -- extra options to pass to the adapter -
libs
(Hash{String=>Array
) -- a list of libraries,}
def initialize(libs, opts = {}, server_opts = {}) self.class.setup self.libraries = libs self.options = opts self.server_options = server_opts self.document_root = server_options[:DocumentRoot] self.router = (options[:router] || Router).new(self) options[:adapter] = self log.debug "Serving libraries using #{self.class}: #{libraries.keys.join(', ')}" log.debug "Caching on" if options[:caching] log.debug "Document root: #{document_root}" if document_root end