Module: Robe

Defined in:
lib/robe/sash.rb,
lib/robe/visor.rb,
lib/robe-server.rb,
lib/robe/jvisor.rb,
lib/robe/server.rb,
lib/robe/scanners.rb,
lib/robe/type_space.rb,
lib/robe/sash/doc_for.rb,
lib/robe/sash/includes_tracker.rb

Defined Under Namespace

Classes: JVisor, MethodScanner, ModuleScanner, Sash, Scanner, Server, TypeSpace, Visor

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.serverObject

Returns the value of attribute server.



6
7
8
# File 'lib/robe-server.rb', line 6

def server
  @server
end

Class Method Details

.start(port = 0) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/robe-server.rb', line 8

def start(port = 0)
  return running_string if @server

  @server = Server.new(Sash.new, port)

  ['INT', 'TERM'].each do |signal|
    trap(signal) { stop }
  end
  Thread.new do
    unless Thread.current[:__yard_registry__]
      Thread.current[:__yard_registry__] = Thread.main[:__yard_registry__]
    end
    @server.start
  end

  @server.wait_for_it

  running_string
end

.stopObject



28
29
30
31
# File 'lib/robe-server.rb', line 28

def stop
  @server.shutdown
  @server = nil
end