documentation_search(store, generator, req, res)
public
Creates the JSON search index on res for
the given store. generator must respond to #json_index
to build. req is ignored.
# File lib/rdoc/servlet.rb, line 162
def documentation_search store, generator, req, res
json_index = @cache[store].fetch :json_index do
@cache[store][:json_index] =
JSON.dump generator.json_index.build_index
end
res.content_type = 'application/javascript'
res.body = "var search_data = #{json_index}"
end