Class: YARD::CLI::Server
Overview
A local documentation server
Instance Attribute Summary collapse
-
#adapter ⇒ Adapter
The adapter to use for loading the web server.
-
#libraries ⇒ Hash
A list of library names and yardoc files to serve.
-
#options ⇒ Hash
A list of options to pass to the doc server.
-
#server_options ⇒ Hash
A list of options to pass to the web server.
Instance Method Summary collapse
Methods inherited from Command
#common_options, #parse_options, run
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 |
#libraries ⇒ Hash
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 |
#options ⇒ Hash
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 |
#server_options ⇒ Hash
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
#description ⇒ Object
18 19 20 |
# File 'lib/yard/cli/server.rb', line 18 def description "Runs a local documentation server" end |
#run(*args) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/yard/cli/server.rb', line 22 def run(*args) self.libraries = {} self. = SymbolHash.new(false).update( :single_library => true, :caching => false ) self. = {:Port => 8808} optparse(*args) select_adapter adapter.new(libraries, , ).start end |