Class: Solargraph::Server
- Inherits:
-
Sinatra::Base
- Object
- Sinatra::Base
- Solargraph::Server
- Defined in:
- lib/solargraph/server.rb
Defined Under Namespace
Classes: Helpers
Constant Summary collapse
- @@api_hash =
{}
- @@semaphore =
Mutex.new
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.prepare_workspace(directory) ⇒ Object
128 129 130 131 132 133 134 135 136 |
# File 'lib/solargraph/server.rb', line 128 def prepare_workspace directory Thread.new do @@semaphore.synchronize { api_map = Solargraph::ApiMap.new(directory) api_map.update_yardoc @@api_hash[directory] = api_map } end end |
.run! ⇒ Object
124 125 126 |
# File 'lib/solargraph/server.rb', line 124 def run! super end |
.wait ⇒ Object
18 19 20 21 |
# File 'lib/solargraph/server.rb', line 18 def self.wait @@semaphore.lock @@semaphore.unlock end |
Instance Method Details
#htmlify(text) ⇒ Object
109 110 111 |
# File 'lib/solargraph/server.rb', line 109 def htmlify text rdoc_to_html text end |
#rdoc_to_html(text) ⇒ Object
113 114 115 116 |
# File 'lib/solargraph/server.rb', line 113 def rdoc_to_html text h = Helpers.new h.html_markup_rdoc(text) end |
#ruby_to_html(code) ⇒ Object
118 119 120 121 |
# File 'lib/solargraph/server.rb', line 118 def ruby_to_html code h = Helpers.new h.html_markup_ruby(code) end |