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
155 156 157 158 159 160 161 162 163 |
# File 'lib/solargraph/server.rb', line 155 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
140 141 142 |
# File 'lib/solargraph/server.rb', line 140 def htmlify text rdoc_to_html text end |
#rdoc_to_html(text) ⇒ Object
144 145 146 147 |
# File 'lib/solargraph/server.rb', line 144 def rdoc_to_html text h = Helpers.new h.html_markup_rdoc(text) end |
#ruby_to_html(code) ⇒ Object
149 150 151 152 |
# File 'lib/solargraph/server.rb', line 149 def ruby_to_html code h = Helpers.new h.html_markup_ruby(code) end |