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
123 124 125 126 127 128 129 130 131 |
# File 'lib/solargraph/server.rb', line 123 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
119 120 121 |
# File 'lib/solargraph/server.rb', line 119 def run! super end |
Instance Method Details
#htmlify(text) ⇒ Object
104 105 106 |
# File 'lib/solargraph/server.rb', line 104 def htmlify text rdoc_to_html text end |
#rdoc_to_html(text) ⇒ Object
108 109 110 111 |
# File 'lib/solargraph/server.rb', line 108 def rdoc_to_html text h = Helpers.new h.html_markup_rdoc(text) end |
#ruby_to_html(code) ⇒ Object
113 114 115 116 |
# File 'lib/solargraph/server.rb', line 113 def ruby_to_html code h = Helpers.new h.html_markup_ruby(code) end |