Class | YARD::CLI::Stats
In: | lib/yard/cli/stats.rb
Parent: | Yardoc

@since 0.6.0

### Methods

all_objects description new output print_statistics print_undocumented_objects run stats_for_classes stats_for_constants stats_for_files stats_for_methods stats_for_modules

### Included Modules

Templates::Helpers::BaseHelper

### Constants

STATS_ORDER | = | [:files, :modules, :classes, :constants, :methods] |  | Maintains the order in which `stats_for_` statistics methods should be printed. @see print_statistics

### Attributes

parse | [RW] | @return [Boolean] whether to parse and load registry

### Public Class methods

new(parse = true)

@param [Boolean] parse whether to parse and load registry (see {parse})

### Public Instance methods

all_objects()

@return [Array<CodeObjects::Base>] all the parsed objects in the registry,

      removing any objects that are not visible (private, protected) depending
      on the arguments passed to the command.

description()
output(name, data, undoc = nil)

Prints a statistic to standard out. This method is optimized for getting Integer values, though it allows any data to be printed.

@param [String] name the statistic name @param [Integer, String] data the numeric (or any) data representing

      the statistic. If +data+ is an Integer, it should represent the
      total objects of a type.

@param [Integer, nil] undoc number of undocumented objects for the type @return [void]

print_statistics()

Prints statistics for different object types

To add statistics for a specific type, add a method +stats_for_TYPE+ to this class that calls {output}.

print_undocumented_objects()

Prints list of undocumented objects

run(*args)

Runs the commandline utility, parsing arguments and generating output if set.

@param [Array<String>] args the list of arguments @return [void]

stats_for_classes()

Statistics for classes

stats_for_constants()

Statistics for constants

stats_for_files()

Statistics for files

stats_for_methods()

Statistics for methods

stats_for_modules()

Statistics for modules

[Validate]