Method deprecated or moved
This method is deprecated or moved on the latest stable version.
The last existing version (v2_2_9) is shown here.
These similar methods exist in v2_5_5:
generate()
public
Writes the JSON index to disk
Show source
def generate
debug_msg "Generating JSON index"
debug_msg " writing search index to %s" % SEARCH_INDEX_FILE
data = build_index
return if @options.dry_run
out_dir = @base_dir + @options.op_dir
index_file = out_dir + SEARCH_INDEX_FILE
FileUtils.mkdir_p index_file.dirname, :verbose => $DEBUG_RDOC
index_file.open 'w', 0644 do |io|
io.set_encoding Encoding::UTF_8 if Object.const_defined? :Encoding
io.write 'var search_data = '
JSON.dump data, io, 0
end
Dir.chdir @template_dir do
Dir['**/*.js'].each do |source|
dest = File.join out_dir, source
FileUtils.install source, dest, :mode => 0644, :verbose => $DEBUG_RDOC
end
end
end