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
-
.prepare_workspace(directory) ⇒ Object
def run! super end.
- .wait ⇒ Object
Instance Method Summary collapse
Class Method Details
.prepare_workspace(directory) ⇒ Object
def run! super end
140 141 142 143 144 145 146 147 148 |
# File 'lib/solargraph/server.rb', line 140 def prepare_workspace directory Thread.new do @@semaphore.synchronize do api_map = Solargraph::ApiMap.new(directory) api_map.yard_map @@api_hash[directory] = api_map end end end |
.wait ⇒ Object
19 20 21 22 |
# File 'lib/solargraph/server.rb', line 19 def self.wait @@semaphore.lock @@semaphore.unlock end |
Instance Method Details
#htmlify(text) ⇒ Object
121 122 123 |
# File 'lib/solargraph/server.rb', line 121 def htmlify text rdoc_to_html text end |
#rdoc_to_html(text) ⇒ Object
125 126 127 128 |
# File 'lib/solargraph/server.rb', line 125 def rdoc_to_html text h = Helpers.new h.html_markup_rdoc(text) end |
#ruby_to_html(code) ⇒ Object
130 131 132 133 |
# File 'lib/solargraph/server.rb', line 130 def ruby_to_html code h = Helpers.new h.html_markup_ruby(code) end |