Class YARD::CLI::YRI
In: lib/yard/cli/yri.rb
Parent: Command

A tool to view documentation in the console like `ri`

Methods

Constants

CACHE_FILE = File.expand_path('~/.yard/yri_cache')   The location in {YARD::CONFIG_DIR} where the YRI cache file is loaded from.
SEARCH_PATHS_FILE = File.expand_path('~/.yard/yri_search_paths')   A file containing all paths, delimited by newlines, to search for yardoc databases. @since 0.5.1
DEFAULT_SEARCH_PATHS = []   Default search paths that should be loaded dynamically into YRI. These paths take precedence over all other paths ({SEARCH_PATHS_FILE} and RubyGems paths). To add a path, call:
  DEFAULT_SEARCH_PATHS.push("/path/to/.yardoc")

@return [Array<String>] a list of extra search paths @since 0.6.0

Public Class methods

Helper method to run the utility on an instance. @see run

Public Instance methods

Runs the command-line utility.

@example

  YRI.new.run('String#reverse')

@param [Array<String>] args each tokenized argument

Protected Instance methods

Caches the .yardoc file where an object can be found in the {CACHE_FILE} @return [void]

Locates an object by name starting in the cached paths and then searching through any search paths.

@param [String] name the full name of the object @return [CodeObjects::Base] an object if found @return [nil] if no object is found

@param [CodeObjects::Base] object the object to print. @return [String] the formatted output for an object.

Prints the command usage @return [void] @since 0.5.6

[Validate]