Class YARD::RegistryStore
In: lib/yard/registry_store.rb
Parent: Object

The data store for the {Registry}.

@see Registry @see Serializers::YardocSerializer

Methods

[]   []=   checksums_path   delete   destroy   get   keys   load   load!   load_all   load_yardoc   new   objects_path   proxy_types_path   put   root   save   values  

Attributes

checksums  [R] 
file  [R] 
proxy_types  [R] 

Public Class methods

Public Instance methods

[](key)

Alias for get

[]=(key, value)

Alias for put

Deletes the .yardoc database on disk

@param [Boolean] force if force is not set to true, the file/directory

  will only be removed if it ends with .yardoc. This helps with
  cases where the directory might have been named incorrectly.

@return [Boolean] true if the .yardoc database was deleted, false

  otherwise.

Gets a {CodeObjects::Base} from the store

@param [String, Symbol] key the path name of the object to look for.

  If it is empty or :root, returns the {#root} object.

@return [CodeObjects::Base, nil] a code object or nil if none is found

Gets all path names from the store. Loads the entire database if reload is true

@param [Boolean] reload if false, does not load the entire database

  before a lookup.

@return [Array<Symbol>] the path names of all the code objects

@param [String, nil] file the name of the yardoc db to load @return [Boolean] whether the database was loaded

Loads the .yardoc file and loads all cached objects into memory automatically.

@param [String, nil] file the name of the yardoc db to load @return [Boolean] whether the database was loaded @see load_all @since 0.5.1

Loads all cached objects into memory @return [void]

Associates an object with a path @param [String, Symbol] key the path name (:root or ’’ for root object) @param [CodeObjects::Base] value the object to store @return [CodeObjects::Base] returns value

Saves the database to disk @param [Boolean] merge if true, merges the data in memory with the

  data on disk, otherwise the data on disk is deleted.

@param [String, nil] file if supplied, the name of the file to save to @return [Boolean] whether the database was saved

Gets all code objects from the store. Loads the entire database if reload is true

@param [Boolean] reload if false, does not load the entire database

  before a lookup.

@return [Array<CodeObjects::Base>] all the code objects

Protected Instance methods

[Validate]