# Class: YARD::CLI::Gems

Inherits:
  Command
  - Object
  - Command
  - YARD::CLI::Gems
  show all

Defined in:
  lib/yard/cli/gems.rb

## Overview

Since:

- 0.6.0

## Instance Method Summary collapse

- #description ⇒ Object
- #initialize ⇒ Gems constructor

  A new instance of Gems.

- #run(*args) ⇒ void

  Runs the commandline utility, parsing arguments and generating YARD indexes for gems.

## Constructor Details

### #initialize ⇒ `Gems`

Returns a new instance of Gems.

Since:

- 0.6.0

    6
    7
    8
    9

    # File 'lib/yard/cli/gems.rb', line 6

    def initialize
      @rebuild = false
      @gems = []
    end

## Instance Method Details

### #description ⇒ `Object`

Since:

- 0.6.0

    11

    # File 'lib/yard/cli/gems.rb', line 11

    def description; "Builds YARD index for gems" end

### #run(*args) ⇒ `void`

This method returns an undefined value.

Runs the commandline utility, parsing arguments and generating YARD indexes for gems.

Parameters:

- args (`Array<String>`) —

  the list of arguments

Since:

- 0.6.0

    18
    19
    20
    21
    22

    # File 'lib/yard/cli/gems.rb', line 18

    def run(*args)
      require 'rubygems'
      optparse(*args)
      build_gems
    end