Class: YARD::CLI::Server
Overview
A local documentation server
Instance Attribute Summary (collapse)
-
- (Adapter) adapter
The adapter to use for loading the web server.
-
- (Hash) libraries
A list of library names and yardoc files to serve.
-
- (Hash) options
A list of options to pass to the doc server.
-
- (Array<String>) scripts
A list of scripts to load.
-
- (Hash) server_options
A list of options to pass to the web server.
-
- (Array<String>) template_paths
A list of template paths to register.
Instance Method Summary (collapse)
- - (Object) description
-
- (Server) initialize
constructor
Creates a new instance of the Server command line utility.
- - (Object) run(*args)
Constructor Details
- (Server) initialize
Creates a new instance of the Server command line utility
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/yard/cli/server.rb', line 27 def initialize super self.scripts = [] self.template_paths = [] self.libraries = {} self. = SymbolHash.new(false).update( :single_library => true, :caching => false ) self. = {:Port => 8808} end |
Instance Attribute Details
- (Adapter) adapter
Returns the adapter to use for loading the web server
16 17 18 |
# File 'lib/yard/cli/server.rb', line 16 def adapter @adapter end |
- (Hash) libraries
Returns a list of library names and yardoc files to serve
13 14 15 |
# File 'lib/yard/cli/server.rb', line 13 def libraries @libraries end |
- (Hash) options
Returns a list of options to pass to the doc server
7 8 9 |
# File 'lib/yard/cli/server.rb', line 7 def @options end |
- (Array<String>) scripts
Returns a list of scripts to load
20 21 22 |
# File 'lib/yard/cli/server.rb', line 20 def scripts @scripts end |
- (Hash) server_options
Returns a list of options to pass to the web server
10 11 12 |
# File 'lib/yard/cli/server.rb', line 10 def @server_options end |
Instance Method Details
- (Object) description
39 40 41 |
# File 'lib/yard/cli/server.rb', line 39 def description "Runs a local documentation server" end |
- (Object) run(*args)
43 44 45 46 47 48 49 50 |
# File 'lib/yard/cli/server.rb', line 43 def run(*args) optparse(*args) select_adapter.setup load_scripts load_template_paths adapter.new(libraries, , ).start end |