Class FastRI::RiIndex
In: lib/fastri/ri_index.rb
Parent: Object

This class provides the same functionality as RiReader, with some improvements:

  • lower memory consumption
  • ability to handle information from different sources separately.

Some operations can be restricted to a given "scope", that is, a "RI DB directory". This allows you to e.g. look for all the instance methods in String defined by a package.

Such operations take a scope argument, which is either an integer which indexes the source in paths, or a name identifying the source (either "system" or a package name). If scope == nil, the information from all sources is merged.

Methods

Classes and Modules

Class FastRI::RiIndex::ClassEntry
Class FastRI::RiIndex::MethodEntry
Class FastRI::RiIndex::TopLevelEntry

Constants

MAGIC = "FastRI index #{FASTRI_INDEX_FORMAT}"

Attributes

paths  [R] 

Public Class methods

Public Instance methods

Return a list of all classes, modules, and methods.

Serializes index to the given IO.

Returns the ClassDescription associated to the given full_name.

Returns the MethodDescription associated to the given full_name. Only the first definition is returned when scope = nil.

Returns an array of MethodEntry objects, corresponding to the methods in the ClassEntry objects in the namespaces array.

Return the names of all classes and modules.

Return the names of all methods.

Return a ClassDescription for a given ClassEntry.

Returns the ClassEntry associated to the given full_name.

Return the MethodDescription for a given MethodEntry by deserializing the YAML.

Returns the MethodEntry associated to the given full_name.

Load the index from the given IO. It must contain a textual representation generated by dump.

Returns an array of ClassEntry objects whose names match target, and which correspond to the namespaces contained in namespaces. namespaces is an array of ClassEntry objects.

Returns array of MethodEntry objects under class_entry_or_name (either String or ClassEntry) in the hierarchy.

Returns array of MethodEntry objects under class_entry_or_name (either String or ClassEntry) in the hierarchy whose full_name matches the given regexp.

Returns array of ClassEntry objects under class_entry_or_name (either String or ClassEntry) in the hierarchy.

Returns array of ClassEntry objects under class_entry_or_name (either String or ClassEntry) in the hierarchy whose full_name matches the given regexp.

Returns the number of methods in the index.

Returns the number of namespaces in the index.

Returns array of Strings corresponding to the base directories of all the sources fo the given entry_or_name.

Returns an array with the top level namespace.

[Validate]