Method: RDoc::Generator::JsonIndex#index_methods

Defined in:
lib/rdoc/generator/json_index.rb

#index_methodsObject

Adds methods to the index



230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
# File 'lib/rdoc/generator/json_index.rb', line 230

def index_methods
  debug_msg "  generating method search index"

  list = @classes.uniq.flat_map do |klass|
    klass.method_list
  end.sort_by do |method|
    [method.name, method.parent.full_name]
  end

  list.each do |method|
    debug_msg "    #{method.full_name}"
    record = method.search_record
    @index[:searchIndex]     << "#{search_string record.shift}()"
    @index[:longSearchIndex] << "#{search_string record.shift}()"
    @index[:info]            << record
  end
end