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
119 120 121 122 123 124 125 126 127 |
# File 'lib/solargraph/server.rb', line 119 def prepare_workspace directory api_map = Solargraph::ApiMap.new(directory) @@semaphore.synchronize { @@api_hash[directory] = api_map } Thread.new { api_map.update_yardoc } end |
.run! ⇒ Object
115 116 117 |
# File 'lib/solargraph/server.rb', line 115 def run! super end |
Instance Method Details
#htmlify(text) ⇒ Object
100 101 102 |
# File 'lib/solargraph/server.rb', line 100 def htmlify text rdoc_to_html text end |
#rdoc_to_html(text) ⇒ Object
104 105 106 107 |
# File 'lib/solargraph/server.rb', line 104 def rdoc_to_html text h = Helpers.new h.html_markup_rdoc(text) end |
#ruby_to_html(code) ⇒ Object
109 110 111 112 |
# File 'lib/solargraph/server.rb', line 109 def ruby_to_html code h = Helpers.new h.html_markup_ruby(code) end |