123456789_123456789_123456789_123456789_123456789_

Class: YARD::CLI::Help

Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, Command
Instance Chain:
self, Command
Inherits: YARD::CLI::Command
Defined in: lib/yard/cli/help.rb

Overview

Handles help for commands

Since:

  • 0.6.0

Class Method Summary

Command - Inherited

.run

Helper method to run the utility on an instance.

Instance Method Summary

Instance Method Details

#description

Since:

  • 0.6.0

[ GitHub ]

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

def description; "Retrieves help for a command" end

#run(*args)

Since:

  • 0.6.0

[ GitHub ]

  
# 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