# Class: YARD::CLI::Help

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

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

## Overview

Handles help for commands

Since:

- 0.6.0

## Instance Method Summary collapse

- #description ⇒ Object
- #run(*args) ⇒ Object

## Instance Method Details

### #description ⇒ `Object`

Since:

- 0.6.0

    7

    # File 'lib/yard/cli/help.rb', line 7

    def description; "Retrieves help for a command" end

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

Since:

- 0.6.0

    9
    10
    11
    12
    13
    14
    15
    16
    17

    # File 'lib/yard/cli/help.rb', line 9

    def run(*args)
      cmd = args.first && CommandParser.commands[args.first.to_sym]
      if cmd
        cmd.run('--help')
      else
        log.puts "Command #{args.first} not found." if args.first
        CommandParser.run('--help')
      end
    end