Module: Gitdocs

Defined in:
lib/gitdocs.rb,
lib/gitdocs/cli.rb,
lib/gitdocs/runner.rb,
lib/gitdocs/server.rb,
lib/gitdocs/docfile.rb,
lib/gitdocs/manager.rb,
lib/gitdocs/version.rb,
lib/gitdocs/configuration.rb

Defined Under Namespace

Classes: Cli, Configuration, Docfile, Manager, Runner, Server

Constant Summary collapse

DEBUG =
ENV['DEBUG']
Restart =
Class.new(RuntimeError)
VERSION =
"0.4.16"

Class Method Summary collapse

Class Method Details

.restartObject



36
37
38
# File 'lib/gitdocs.rb', line 36

def self.restart
  @manager.restart
end

.start(options = {}, &blk) ⇒ Object

Gitdocs.start(:config_root => “…”, :debug => true)



29
30
31
32
33
34
# File 'lib/gitdocs.rb', line 29

def self.start(options={}, &blk)
  options = { :debug => DEBUG, :config_root => nil }.merge(options)
  @manager.stop if @manager
  @manager = Manager.new(options[:config_root], options[:debug], &blk)
  @manager.start(options[:port])
end

.stopObject



40
41
42
# File 'lib/gitdocs.rb', line 40

def self.stop
  @manager.stop
end